{"id":542,"date":"2021-02-22T04:21:58","date_gmt":"2021-02-22T04:21:58","guid":{"rendered":"http:\/\/roglacup.com\/klaus62\/?p=542"},"modified":"2021-02-22T04:21:58","modified_gmt":"2021-02-22T04:21:58","slug":"installing-a-powershell-module","status":"publish","type":"post","link":"https:\/\/roglacup.com\/klaus62\/2021\/02\/22\/installing-a-powershell-module\/","title":{"rendered":"Installing a PowerShell Module"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"installing-modules-in-a-product-directory\">Installing Modules in a Product Directory<\/h3>\n\n\n\n<p>If you are distributing the module to other parties, use the default Program Files location described above, or create your own company-specific or product-specific subdirectory of the %ProgramFiles% directory.<\/p>\n\n\n\n<p>For example, Fabrikam Technologies, a fictitious company, is shipping a Windows PowerShell module for their Fabrikam Manager product. Their module installer creates a Modules subdirectory in the Fabrikam Manager product subdirectory.Copy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\Program Files\n  Fabrikam Technologies\n    Fabrikam Manager\n      Modules\n        Fabrikam\n          Fabrikam.psd1 (module manifest)\n          Fabrikam.dll (module assembly)\n\n<\/code><\/pre>\n\n\n\n<p>To enable the Windows PowerShell module discovery features to find the Fabrikam module, the Fabrikam module installer adds the module location to the value of the&nbsp;<strong>PSModulePath<\/strong>&nbsp;environment variable.PowerShellCopy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$p = &#91;Environment]::GetEnvironmentVariable(\"PSModulePath\")\n$p += \";C:\\Program Files\\Fabrikam Technologies\\Fabrikam Manager\\Modules\\\"\n&#91;Environment]::SetEnvironmentVariable(\"PSModulePath\",$p)\n<\/code><\/pre>\n\n\n\n<p>Posted from: <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/scripting\/developer\/module\/installing-a-powershell-module?view=powershell-7.1\">https:\/\/docs.microsoft.com\/en-us\/powershell\/scripting\/developer\/module\/installing-a-powershell-module?view=powershell-7.1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing Modules in a Product Directory If you are distributing the module to other parties, use the default Program Files location described above, or create your own company-specific or product-specific subdirectory of the %ProgramFiles% directory. For example, Fabrikam Technologies, a fictitious company, is shipping a Windows PowerShell module for their Fabrikam Manager product. Their module&hellip;&nbsp;<a href=\"https:\/\/roglacup.com\/klaus62\/2021\/02\/22\/installing-a-powershell-module\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Installing a PowerShell Module<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[18,20],"tags":[],"class_list":["post-542","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-script"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/posts\/542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/comments?post=542"}],"version-history":[{"count":1,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/posts\/542\/revisions"}],"predecessor-version":[{"id":543,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/posts\/542\/revisions\/543"}],"wp:attachment":[{"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/media?parent=542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/categories?post=542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/roglacup.com\/klaus62\/wp-json\/wp\/v2\/tags?post=542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}