{"id":12446,"date":"2016-07-13T06:00:00","date_gmt":"2016-07-13T13:00:00","guid":{"rendered":"https:\/\/www.sapien.com\/blog\/?p=12446"},"modified":"2016-07-13T08:24:24","modified_gmt":"2016-07-13T15:24:24","slug":"which-version-does-import-module-import","status":"publish","type":"post","link":"https:\/\/dev.sapien.com\/blog\/2016\/07\/13\/which-version-does-import-module-import\/","title":{"rendered":"Which Version Does Import-Module Import?"},"content":{"rendered":"<p>Applies to: Windows PowerShell 5.0.10586, 5.1.14385.0, PowerShellGet 1.0.0.1<\/p>\n<p>The <a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=141553\">Import-Module<\/a> cmdlet, the <a href=\"https:\/\/technet.microsoft.com\/en-us\/library\/hh847765.aspx\">#Requires directive<\/a>, and <a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=144311\">module auto-loading<\/a> (PS 3.0+) all import modules into a PowerShell session. But, which modules do they import by default? It&#8217;s an important question when you are writing shared code that uses commands from other modules. And, the answer has become more complex with the advent of side-by-side versioning in PowerShell 5.0.<\/p>\n<p><a href=\"http:\/\/info.sapien.com\/index.php\/scripting\/scripting-modules\/which-version-does-import-module-import\" target=\"_blank\">Read the full post in the SAPIEN Information Center<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p><em>June Blender is a technology evangelist at SAPIEN Technologies, Inc. and a Windows PowerShell MVP. You can reach her at <\/em><a href=\"mailto:juneb@sapien.com\"><em>juneb@sapien.com <\/em><\/a><em>or follow her on Twitter at <\/em><a href=\"https:\/\/www.twitter.com\/juneb_get_help\"><em>@juneb_get_help<\/em><\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Applies to: Windows PowerShell 5.0.10586, 5.1.14385.0, PowerShellGet 1.0.0.1 The Import-Module cmdlet, the #Requires directive, and module auto-loading (PS 3.0+) all import modules into a PowerShell session. But, which modules do they import by default? It&#8217;s an important question when you are writing shared code that uses commands from other modules. And, the answer has become [&hellip;]<\/p>\n","protected":false},"author":31,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1143,941,1152],"tags":[1155,1154,1156,1153,551,1130,28,961,1132,1131],"class_list":["post-12446","post","type-post","status-publish","format-standard","hentry","category-powershell","category-powershell-5-0","category-versions","tag-requires","tag-import-module","tag-module-auto-loading","tag-module-qualified","tag-modules","tag-modulespecification","tag-powershell","tag-powershell-5-0","tag-versionchaos","tag-versioning"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/12446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/comments?post=12446"}],"version-history":[{"count":27,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/12446\/revisions"}],"predecessor-version":[{"id":12493,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/posts\/12446\/revisions\/12493"}],"wp:attachment":[{"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/media?parent=12446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/categories?post=12446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.sapien.com\/blog\/wp-json\/wp\/v2\/tags?post=12446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}