{"id":5236,"date":"2021-09-21T11:41:15","date_gmt":"2021-09-21T09:41:15","guid":{"rendered":"https:\/\/lazyadmin.nl\/?p=5236"},"modified":"2024-10-10T11:44:19","modified_gmt":"2024-10-10T09:44:19","slug":"get-powershell-version","status":"publish","type":"post","link":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/","title":{"rendered":"How to Check PowerShell Version"},"content":{"rendered":"\n<p>The PowerShell version determines which features you can use. So before you can run a specific script or cmdlet, you might need to check which PowerShell version you are using.<\/p>\n\n\n\n<p>You can check the PowerShell version with a single command. If you are using PowerShell 7 then it&#8217;s even displayed automatically when you open a new PowerShell session.<\/p>\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">In this article<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69f3bd007086e\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\" style='display:none' id=\"ez-toc-cssicon-toggle-item-69f3bd007086e\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#check-powershell-version\" >Check PowerShell Version<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#get-the-powershell-version-in-script\" >Get the PowerShell version in Script<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#using-the-host-variable\" >Using the $host Variable<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#using-the-registry\" >Using the Registry<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#get-powershell-version-from-remote-host\" >Get PowerShell Version from Remote Host<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#updating-your-powershell\" >Updating your PowerShell<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#wrapping-up\" >Wrapping Up<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<p>In this article, I will explain how you can quickly check the PowerShell version, and how to use this method inside your scripts or on a remote machine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"get-version\"><span class=\"ez-toc-section\" id=\"check-powershell-version\"><\/span>Check PowerShell Version<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To check which version of PowerShell you are using, you can use a single command in PowerShell to find the exact version number:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$PSVersionTable.PSVersion<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"795\" height=\"210\" src=\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/10\/image-24.png\" alt=\"Get PowerShell Version\" class=\"wp-image-10971\" srcset=\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/10\/image-24.png 795w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/10\/image-24-300x79.png 300w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/10\/image-24-768x203.png 768w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/10\/image-24-400x106.png 400w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/10\/image-24-50x13.png 50w\" sizes=\"(max-width: 795px) 100vw, 795px\" \/><\/figure>\n\n\n\n<p>The PSVersion value is the PowerShell version that you are using. In the example above, we are using PowerShell 7.4.5. As mentioned in the beginning, when you open PowerShell 7, you will also see the version number printed on the first line:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"803\" height=\"146\" src=\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-7.png\" alt=\"which powershell version\" class=\"wp-image-9625\" srcset=\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-7.png 803w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-7-300x55.png 300w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-7-768x140.png 768w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-7-800x145.png 800w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-7-400x73.png 400w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-7-50x9.png 50w\" sizes=\"(max-width: 803px) 100vw, 803px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"get-the-powershell-version-in-script\"><\/span>Get the PowerShell version in Script<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>When you are creating a PowerShell script, that uses specific cmdlets that only work in PowerShell 7 or 5.1 for example, then you will need to build in a check for the version.<\/p>\n\n\n\n<p>Instead of getting all the version information, we can get the major version number (5 or 7 for example) by directly selecting the major version number:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$PSVersionTable.PSVersion.Major\n\n# Returns\n7<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"using-the-host-variable\"><\/span>Using the $host Variable<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Another commonly mentioned option is to use the <code>$host<\/code> variable to check the PowerShell version. The $host variable returns information about the host that is running PowerShell. This works great in your local PowerShell console:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$host\n\n# Or directly the version number\n$host.version<\/pre>\n\n\n\n<p>But using the <code>$host<\/code> variable or the <code>Get-Host<\/code> cmdlet will cause problems when using it on a remote machine or for example in Visual Studio code. The problem is, that it returns information about the host, and not about the PowerShell engine.<\/p>\n\n\n\n<p>Take the example below, if we look at the <code>$PSVersionTable<\/code> variable in Visual Studio Code, then it returns PowerShell version 7.4.1. But the <code>$host<\/code> variable returns the version of Visual Studio Code instead of the PowerShell engine.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"799\" height=\"295\" src=\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-8.png\" alt=\"show powershell version\" class=\"wp-image-9626\" srcset=\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-8.png 799w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-8-300x111.png 300w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-8-768x284.png 768w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-8-400x148.png 400w, https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/02\/image-8-50x18.png 50w\" sizes=\"(max-width: 799px) 100vw, 799px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"using-the-registry\"><\/span>Using the Registry<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The last option that you can use to check the PowerShell version is to use the registry. Now this may not be the most convenient method, but this option can be useful when you need to inventory multiple computers.<\/p>\n\n\n\n<p>There is only one challenge with the registry method, the version number for PowerShell 7 is stored in a different location compared to the older version.<\/p>\n\n\n\n<p>So to check the version numbers we can use the following two registry paths:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Get the older PowerShell versions\nGet-ItemPropertyValue -Path HKLM:\\SOFTWARE\\Microsoft\\PowerShell\\3\\PowerShellEngine -Name 'PowerShellVersion'\n\n# Get the PowerShell 7 Version\nGet-ItemPropertyValue -Path HKLM:\\SOFTWARE\\Microsoft\\PowerShellCore\\InstalledVersions\\31ab5147-9a97-4452-8443-d9709f0516e1 -Name 'SemanticVersion'<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"remote-host\"><span class=\"ez-toc-section\" id=\"get-powershell-version-from-remote-host\"><\/span>Get PowerShell Version from Remote Host<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Before you can run a script on a remote computer you sometimes first need to check which version is installed. Some servers may still have only version 2 or 3 installed, which may limit the cmdlets that you can use on your script.<\/p>\n\n\n\n<p>To get the version from a remote host we are going to use the <a href=\"https:\/\/lazyadmin.nl\/powershell\/invoke-command\/\">invoke-command<\/a> cmdlet. This allows us the run a script block on a remote computer and return the results to use:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"powershell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Invoke-Command -Computername lazy-lab11 -Scriptblock {$PSVersionTable.PSVersion}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"update-powershell\"><span class=\"ez-toc-section\" id=\"updating-your-powershell\"><\/span>Updating your PowerShell<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>PowerShell is a built-in tool in Windows, which means that it is updated with Windows Updates. In Windows 10 and Windows 11, you get PowerShell 5.1 by default. To update to PowerShell 7 you will need to manually install it.<\/p>\n\n\n\n<p>Read more about installing PowerShell 7 and updating it in <a href=\"https:\/\/lazyadmin.nl\/powershell\/install-powershell-7\/\">this article<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"wrapping-up\"><\/span>Wrapping Up<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Even though the $host variable is easier to remember, it is recommended to use the $PSVersionTable instead. This is more reliable than the host variable, especially in scripts or when you need to work with remote computers.<\/p>\n\n\n\n<p>I hope you found this article useful, if you have any questions just drop a comment below.<\/p>\n<script async src=\"https:\/\/alatus.eocampaign1.com\/form\/d0ce5de8-9b48-11ee-8cf4-eb425eea7369.js\" data-form=\"d0ce5de8-9b48-11ee-8cf4-eb425eea7369\"><\/script>","protected":false},"excerpt":{"rendered":"<p>The PowerShell version determines which features you can use. So before you can run a specific script or cmdlet, you might need to check which PowerShell version you are using. You can check the PowerShell version with a single command. &#8230; <a title=\"How to Check PowerShell Version\" class=\"read-more\" href=\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/\">Read more<span class=\"screen-reader-text\">How to Check PowerShell Version<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":5246,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_uag_custom_page_level_css":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[69],"tags":[22],"class_list":["post-5236","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-powershell"],"wppr_data":{"cwp_meta_box_check":"No"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Check PowerShell Version (easy method) &#8212; LazyAdmin<\/title>\n<meta name=\"description\" content=\"Check PowerShell Version quickly with a single and super short command. Inc tips to check PS version on Remote Host and in your scripts\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Check PowerShell Version (easy method) &#8212; LazyAdmin\" \/>\n<meta property=\"og:description\" content=\"Check PowerShell Version quickly with a single and super short command. Inc tips to check PS version on Remote Host and in your scripts\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/\" \/>\n<meta property=\"og:site_name\" content=\"LazyAdmin\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/lazyadminnl\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/lazyadminnl\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-09-21T09:41:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-10T09:44:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"450\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Rudy Mens\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/lazyadmin\" \/>\n<meta name=\"twitter:site\" content=\"@lazyadmin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rudy Mens\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/\"},\"author\":{\"name\":\"Rudy Mens\",\"@id\":\"https:\/\/lazyadmin.nl\/#\/schema\/person\/cbfba61543b21fbba63cfbf62f08d952\"},\"headline\":\"How to Check PowerShell Version\",\"datePublished\":\"2021-09-21T09:41:15+00:00\",\"dateModified\":\"2024-10-10T09:44:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/\"},\"wordCount\":599,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/lazyadmin.nl\/#\/schema\/person\/cbfba61543b21fbba63cfbf62f08d952\"},\"image\":{\"@id\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg\",\"keywords\":[\"Powershell\"],\"articleSection\":[\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/\",\"url\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/\",\"name\":\"How to Check PowerShell Version (easy method) &#8212; LazyAdmin\",\"isPartOf\":{\"@id\":\"https:\/\/lazyadmin.nl\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg\",\"datePublished\":\"2021-09-21T09:41:15+00:00\",\"dateModified\":\"2024-10-10T09:44:19+00:00\",\"description\":\"Check PowerShell Version quickly with a single and super short command. Inc tips to check PS version on Remote Host and in your scripts\",\"breadcrumb\":{\"@id\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#primaryimage\",\"url\":\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg\",\"contentUrl\":\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg\",\"width\":800,\"height\":450},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/lazyadmin.nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Check PowerShell Version\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/lazyadmin.nl\/#website\",\"url\":\"https:\/\/lazyadmin.nl\/\",\"name\":\"LazyAdmin\",\"description\":\"Tips and howto&#039;s about Office 365, PowerShell, Home network and smart devices\",\"publisher\":{\"@id\":\"https:\/\/lazyadmin.nl\/#\/schema\/person\/cbfba61543b21fbba63cfbf62f08d952\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/lazyadmin.nl\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/lazyadmin.nl\/#\/schema\/person\/cbfba61543b21fbba63cfbf62f08d952\",\"name\":\"Rudy Mens\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/lazyadmin.nl\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/06\/Profile-photo-2024-Ruud.jpg\",\"contentUrl\":\"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/06\/Profile-photo-2024-Ruud.jpg\",\"width\":500,\"height\":500,\"caption\":\"Rudy Mens\"},\"logo\":{\"@id\":\"https:\/\/lazyadmin.nl\/#\/schema\/person\/image\/\"},\"description\":\"Ruud worked for more than 15 years as a SysAdmin in the Netherlands and is now working as an independent consultant. In his spare time, he loves to thinker with Smart Devices.\",\"sameAs\":[\"https:\/\/lazyadmin.nl\",\"https:\/\/www.facebook.com\/lazyadminnl\/\",\"http:\/\/nl.linkedin.com\/in\/rudymens\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/lazyadmin\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Check PowerShell Version (easy method) &#8212; LazyAdmin","description":"Check PowerShell Version quickly with a single and super short command. Inc tips to check PS version on Remote Host and in your scripts","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/","og_locale":"en_US","og_type":"article","og_title":"How to Check PowerShell Version (easy method) &#8212; LazyAdmin","og_description":"Check PowerShell Version quickly with a single and super short command. Inc tips to check PS version on Remote Host and in your scripts","og_url":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/","og_site_name":"LazyAdmin","article_publisher":"https:\/\/www.facebook.com\/lazyadminnl\/","article_author":"https:\/\/www.facebook.com\/lazyadminnl\/","article_published_time":"2021-09-21T09:41:15+00:00","article_modified_time":"2024-10-10T09:44:19+00:00","og_image":[{"width":800,"height":450,"url":"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg","type":"image\/jpeg"}],"author":"Rudy Mens","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/lazyadmin","twitter_site":"@lazyadmin","twitter_misc":{"Written by":"Rudy Mens","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#article","isPartOf":{"@id":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/"},"author":{"name":"Rudy Mens","@id":"https:\/\/lazyadmin.nl\/#\/schema\/person\/cbfba61543b21fbba63cfbf62f08d952"},"headline":"How to Check PowerShell Version","datePublished":"2021-09-21T09:41:15+00:00","dateModified":"2024-10-10T09:44:19+00:00","mainEntityOfPage":{"@id":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/"},"wordCount":599,"commentCount":1,"publisher":{"@id":"https:\/\/lazyadmin.nl\/#\/schema\/person\/cbfba61543b21fbba63cfbf62f08d952"},"image":{"@id":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#primaryimage"},"thumbnailUrl":"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg","keywords":["Powershell"],"articleSection":["PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/","url":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/","name":"How to Check PowerShell Version (easy method) &#8212; LazyAdmin","isPartOf":{"@id":"https:\/\/lazyadmin.nl\/#website"},"primaryImageOfPage":{"@id":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#primaryimage"},"image":{"@id":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#primaryimage"},"thumbnailUrl":"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg","datePublished":"2021-09-21T09:41:15+00:00","dateModified":"2024-10-10T09:44:19+00:00","description":"Check PowerShell Version quickly with a single and super short command. Inc tips to check PS version on Remote Host and in your scripts","breadcrumb":{"@id":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#primaryimage","url":"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg","contentUrl":"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg","width":800,"height":450},{"@type":"BreadcrumbList","@id":"https:\/\/lazyadmin.nl\/powershell\/get-powershell-version\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lazyadmin.nl\/"},{"@type":"ListItem","position":2,"name":"How to Check PowerShell Version"}]},{"@type":"WebSite","@id":"https:\/\/lazyadmin.nl\/#website","url":"https:\/\/lazyadmin.nl\/","name":"LazyAdmin","description":"Tips and howto&#039;s about Office 365, PowerShell, Home network and smart devices","publisher":{"@id":"https:\/\/lazyadmin.nl\/#\/schema\/person\/cbfba61543b21fbba63cfbf62f08d952"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lazyadmin.nl\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/lazyadmin.nl\/#\/schema\/person\/cbfba61543b21fbba63cfbf62f08d952","name":"Rudy Mens","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lazyadmin.nl\/#\/schema\/person\/image\/","url":"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/06\/Profile-photo-2024-Ruud.jpg","contentUrl":"https:\/\/lazyadmin.nl\/wp-content\/uploads\/2024\/06\/Profile-photo-2024-Ruud.jpg","width":500,"height":500,"caption":"Rudy Mens"},"logo":{"@id":"https:\/\/lazyadmin.nl\/#\/schema\/person\/image\/"},"description":"Ruud worked for more than 15 years as a SysAdmin in the Netherlands and is now working as an independent consultant. In his spare time, he loves to thinker with Smart Devices.","sameAs":["https:\/\/lazyadmin.nl","https:\/\/www.facebook.com\/lazyadminnl\/","http:\/\/nl.linkedin.com\/in\/rudymens\/","https:\/\/x.com\/https:\/\/twitter.com\/lazyadmin"]}]}},"uagb_featured_image_src":{"full":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg",800,450,false],"thumbnail":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version-150x150.jpg",150,150,true],"medium":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version-300x169.jpg",300,169,true],"medium_large":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version-768x432.jpg",768,432,true],"large":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg",800,450,false],"1536x1536":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg",800,450,false],"2048x2048":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg",800,450,false],"post-thumb":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg",800,450,false],"post-thumb-half":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version-400x225.jpg",400,225,true],"wppr-widget":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version-50x28.jpg",50,28,true],"gform-image-choice-sm":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg",300,169,false],"gform-image-choice-md":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg",400,225,false],"gform-image-choice-lg":["https:\/\/lazyadmin.nl\/wp-content\/uploads\/2021\/09\/PowerShell-Version.jpg",600,338,false]},"uagb_author_info":{"display_name":"Rudy Mens","author_link":"https:\/\/lazyadmin.nl\/author\/lajcud8123b\/"},"uagb_comment_info":1,"uagb_excerpt":"The PowerShell version determines which features you can use. So before you can run a specific script or cmdlet, you might need to check which PowerShell version you are using. You can check the PowerShell version with a single command. ... Read moreHow to Check PowerShell Version","_links":{"self":[{"href":"https:\/\/lazyadmin.nl\/wp-json\/wp\/v2\/posts\/5236"}],"collection":[{"href":"https:\/\/lazyadmin.nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lazyadmin.nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lazyadmin.nl\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/lazyadmin.nl\/wp-json\/wp\/v2\/comments?post=5236"}],"version-history":[{"count":0,"href":"https:\/\/lazyadmin.nl\/wp-json\/wp\/v2\/posts\/5236\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lazyadmin.nl\/wp-json\/wp\/v2\/media\/5246"}],"wp:attachment":[{"href":"https:\/\/lazyadmin.nl\/wp-json\/wp\/v2\/media?parent=5236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lazyadmin.nl\/wp-json\/wp\/v2\/categories?post=5236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lazyadmin.nl\/wp-json\/wp\/v2\/tags?post=5236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}