{"id":86324,"date":"2019-09-11T13:00:12","date_gmt":"2019-09-11T21:00:12","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/scripting\/?p=86324"},"modified":"2019-09-06T08:44:59","modified_gmt":"2019-09-06T16:44:59","slug":"powertip-identify-if-you-are-running-on-powershell-core","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powertip-identify-if-you-are-running-on-powershell-core\/","title":{"rendered":"PowerTip: Identify if you are running on PowerShell Core"},"content":{"rendered":"<p><strong>Summary<\/strong>: Pulling up the properties of $PSVersionTable to identify your PowerShell edition<\/p>\n<p><img decoding=\"async\" width=\"34\" height=\"34\" class=\"wp-image-86325\" src=\"http:\/\/devblogs.microsoft.com\/scripting\/wp-content\/uploads\/sites\/29\/2019\/09\/a-picture-containing-scissors-description-automat-1.jpeg\" alt=\"A picture containing scissors\n\nDescription automatically generated\" \/><\/p>\n<p>Hey, Doctor Scripto! I want to write my modules and scripts to be more portable. How can I tell if I am executing on PowerShell Core?<\/p>\n<p><img decoding=\"async\" width=\"34\" height=\"34\" class=\"wp-image-86326\" src=\"http:\/\/devblogs.microsoft.com\/scripting\/wp-content\/uploads\/sites\/29\/2019\/09\/word-image-1.jpeg\" \/><\/p>\n<p>Just use the $PSVersionTable object and examine the PSEdition value. If it returns &#8216;Core&#8217; you are running on PowerShell core.<\/p>\n<p>$PSVersionTable.PSEdition<\/p>\n<p><img decoding=\"async\" width=\"96\" height=\"145\" class=\"wp-image-86327\" src=\"http:\/\/devblogs.microsoft.com\/scripting\/wp-content\/uploads\/sites\/29\/2019\/09\/word-image-8.png\" \/><\/p>\n<p>PowerShell, Doctor Scripto, PowerTip, Sean Kearney<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Pulling up the properties of $PSVersionTable to identify your PowerShell edition Hey, Doctor Scripto! I want to write my modules and scripts to be more portable. How can I tell if I am executing on PowerShell Core? Just use the $PSVersionTable object and examine the PSEdition value. If it returns &#8216;Core&#8217; you are running [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1739,1738,639],"tags":[1740,377,356,154],"class_list":["post-86324","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-doctor-scripto","category-powershell","category-powertip","tag-doctor-scripto","tag-powershell","tag-powertip","tag-sean-kearney"],"acf":[],"blog_post_summary":"<p>Summary: Pulling up the properties of $PSVersionTable to identify your PowerShell edition Hey, Doctor Scripto! I want to write my modules and scripts to be more portable. How can I tell if I am executing on PowerShell Core? Just use the $PSVersionTable object and examine the PSEdition value. If it returns &#8216;Core&#8217; you are running [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/86324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=86324"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/86324\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=86324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=86324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=86324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}