{"id":16001,"date":"2011-01-05T00:01:00","date_gmt":"2011-01-05T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2011\/01\/05\/simplify-desktop-configuration-by-using-a-shared-powershell-module\/"},"modified":"2011-01-05T00:01:00","modified_gmt":"2011-01-05T00:01:00","slug":"simplify-desktop-configuration-by-using-a-shared-powershell-module","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/simplify-desktop-configuration-by-using-a-shared-powershell-module\/","title":{"rendered":"Simplify Desktop Configuration by Using a Shared PowerShell Module"},"content":{"rendered":"<p><span style=\"font-size:10.0pt\">&nbsp;<\/span><span style=\"font-size:10.0pt\">&nbsp;<\/span>\n<b><span style=\"font-size:10.0pt\">Summary:<\/span><\/b><span style=\"font-size:10.0pt\"> Simplify your desktop configuration needs by using a Windows PowerShell module stored on a central file share.<\/span>\n<span style=\"font-size:10.0pt\">&nbsp;<\/span>\n<span style=\"font-size:10.0pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><img decoding=\"async\" height=\"34\" width=\"34\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" align=\"left\" alt=\"Hey, Scripting Guy! Question\" border=\"0\" title=\"Hey, Scripting Guy! Question\"><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>Hey, Scripting Guy! I enjoy using Windows PowerShell modules. I think they are way cool. The thing is, I am not too keen on deploying them to remote workstations. What would be great is if there was a way that I could use a module that was stored on a central server. Is that possible?<\/span>\n<span style=\"font-size:10.0pt\">&#8212; MT<\/span>\n<span style=\"font-size:10.0pt\">&nbsp;<\/span>\n<span style=\"font-size:10.0pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><span style=\"font-size: 10pt\"><img decoding=\"async\" height=\"34\" width=\"34\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" align=\"left\" alt=\"Hey, Scripting Guy! Answer\" border=\"0\" title=\"Hey, Scripting Guy! Answer\"><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span>Hello MT, Microsoft Scripting Guy Ed Wilson here. Well, today is a cool day&mdash;both literally and figuratively. The weather bit is not unusual, it is January after all, but when the weekend temperatures reached 65 degrees Fahrenheit (18 degrees Celsius) I was hoping that winter was over. The cool (figuratively) part about today is that I am going to speak to the Northern Colorado SharePoint Users Group this evening (via <a href=\"http:\/\/office.microsoft.com\/en-us\/help\/microsoft-office-live-meeting-resource-center-HA010238900.aspx?CTT=1\">Live Meeting<\/a>). I have been to Denver several times teaching Windows PowerShell workshops to Microsoft Premier Customers but have not been outside of the city. Tonight I will correct that (at least virtually). <\/span>\n<span style=\"font-size:10.0pt\">Utilizing a module from a central file share is no different than using a module from one of the two default locations. When a module is placed in the <b>%windir%System32WindowsPowerShellv1.0Modules<\/b> folder is available to all users. If a module is placed in the <b>%UserProfile%My documentsWindowsPowerShellModules<\/b> folder it is only available to the specific user. The advantage of placing modules in the <b>%UserProfile%<\/b> location is the user automatically has permission to perform the installation, whereas system location requires Administrator rights on Windows Vista and later. <\/span>\n<span style=\"font-size:10.0pt\">Speaking of installation of Windows PowerShell modules, in many cases the installation of a Windows PowerShell module is no more complicated than placing the <b>*.psm1<\/b> file in a folder in default user location. The key point is that the folder that is created under the <b>Modules<\/b> folder must have the same name as the module name itself. When installing modules on a local computer, I use my <a href=\"http:\/\/blogs.technet.comhttps:\/\/devblogs.microsoft.com\/scripting\/hey-scripting-guy-january-19-2010\/\">Copy-Modules.ps1 script<\/a>. <\/span>\n<span style=\"font-size:10.0pt\">When I copy a Windows PowerShell module to a network shared location, I follow the same rules. I make sure that the folder that contains the module is the same name as the module name. As an example, I am going to copy my conversion module to a shared drive on one of my Windows Server 2008 R2 Hyperv servers (I am using this shared drive because I already have it shared out on my local network). The module I will use is the same one that I developed during the first <a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/tags\/weekend+scripter\/\">Weekend Scripter<\/a> articles&mdash;the <b>ConversionModuleV6<\/b> module. As seen here, that module is now shared out (there are also <a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2010\/08\/08\/weekend-scripter-automatically-collecting-process-snapshots.aspx\">process snapshots stored in XML from a previous Weekend Scripter article<\/a>). <\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">PS C:&gt; dir \\hyperv-boxshared<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\"><span>&nbsp;&nbsp;&nbsp; <\/span>Directory: \\hyperv-boxshared<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">Mode<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>LastWriteTime<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Length Name<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212;&#8212;&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212; &#8212;-<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">d&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1\/4\/2011<span>&nbsp;&nbsp; <\/span>3:53 PM<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>ConversionModuleV6<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>12\/13\/2010<span>&nbsp;&nbsp; <\/span>3:12 PM<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>32 bios.ps1<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>12\/13\/2010<span>&nbsp;&nbsp; <\/span>2:45 PM<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1086 Get-SharedFolders.ps1<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>12\/26\/2010<span>&nbsp;&nbsp; <\/span>9:24 PM<span>&nbsp;&nbsp;&nbsp; <\/span>8344438 Process1_BIGT-PC.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1\/4\/2011<span>&nbsp; <\/span>10:45 AM<span>&nbsp;&nbsp;&nbsp; <\/span>9547600 Process1_MRED1.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>10\/12\/2010<span>&nbsp; <\/span>11:37 AM<span>&nbsp;&nbsp;&nbsp; <\/span>9272696 Process1_TERESA-WIN7.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1\/4\/2011<span>&nbsp;&nbsp; <\/span>4:12 PM<span>&nbsp;&nbsp;&nbsp; <\/span>6448040 Process1_WIN7-C1.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>12\/26\/2010<span>&nbsp;&nbsp; <\/span>9:26 PM<span>&nbsp;&nbsp; <\/span>10451674 Process2_BIGT-PC.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1\/4\/2011<span>&nbsp; <\/span>10:46 AM<span>&nbsp;&nbsp;&nbsp; <\/span>9153432 Process2_MRED1.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>10\/12\/2010<span>&nbsp; <\/span>11:38 AM<span>&nbsp;&nbsp; <\/span>11106128 Process2_TERESA-WIN7.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1\/4\/2011<span>&nbsp;&nbsp; <\/span>4:13 PM<span>&nbsp;&nbsp;&nbsp; <\/span>6897914 Process2_WIN7-C1.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>12\/26\/2010<span>&nbsp;&nbsp; <\/span>9:27 PM<span>&nbsp;&nbsp; <\/span>10283808 Process3_BIGT-PC.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1\/4\/2011<span>&nbsp; <\/span>10:47 AM<span>&nbsp;&nbsp;&nbsp; <\/span>9141224 Process3_MRED1.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>10\/12\/2010<span>&nbsp; <\/span>11:39 AM<span>&nbsp;&nbsp; <\/span>11489310 Process3_TERESA-WIN7.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1\/4\/2011<span>&nbsp;&nbsp; <\/span>4:15 PM<span>&nbsp;&nbsp;&nbsp; <\/span>7521712 Process3_WIN7-C1.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>12\/26\/2010<span>&nbsp;&nbsp; <\/span>9:29 PM<span>&nbsp;&nbsp; <\/span>10163664 Process4_BIGT-PC.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1\/4\/2011<span>&nbsp; <\/span>10:49 AM<span>&nbsp;&nbsp;&nbsp; <\/span>9066674 Process4_MRED1.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>10\/12\/2010<span>&nbsp; <\/span>11:41 AM<span>&nbsp;&nbsp; <\/span>12156950 Process4_TERESA-WIN7.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>1\/4\/2011<span>&nbsp;&nbsp; <\/span>4:16 PM<span>&nbsp;&nbsp;&nbsp; <\/span>7767062 Process4_WIN7-C1.xml<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">-a&#8212;<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>7\/12\/2010<span>&nbsp; <\/span>12:06 PM<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>728046 ScriptingGuysWallPaper.jpg<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">PS C:&gt;<\/span><\/span>\n<span style=\"font-size:10.0pt\">&nbsp;<\/span>\n<span style=\"font-size:10.0pt\">To import the module from the shared location, I include the path to the module. As seen here, I can even use wildcards for the module name.<\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">Import-Module \\hyperv-boxsharedconv*<\/span><\/span>\n<span style=\"font-size:10.0pt\">&nbsp;<\/span>\n<span style=\"font-size:10.0pt\">To see if the module has loaded, I use the <b>Get-Module<\/b> Windows PowerShell cmdlet. As seen here, the <b>ConversionModuleV6<\/b> is the only module currently loaded on my computer and the path confirms that it loaded from the network location.<\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">PS C:&gt; Get-Module | format-list *<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">ExportedCommands<span>&nbsp;&nbsp;&nbsp; <\/span>: {ConvertTo-Feet, ConvertTo-Miles, ConvertTo-MetersPerSecond, C<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>onvertTo-Pounds&#8230;}<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">Name<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: ConversionModuleV6<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">Path<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: \\hyperv-boxsharedConversionModuleV6ConversionModuleV6.psm1<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">Description<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>:<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">Guid<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: 00000000-0000-0000-0000-000000000000<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">ModuleBase<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: \\hyperv-boxsharedConversionModuleV6<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">PrivateData<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>:<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">Version<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: 0.0<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">ModuleType<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: Script<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">AccessMode<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: ReadWrite<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">ExportedFunctions<span>&nbsp;&nbsp; <\/span>: {[ConvertTo-celsius, ConvertTo-celsius], [ConvertTo-Fahrenheit<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>, ConvertTo-Fahrenheit], [ConvertTo-Feet, ConvertTo-Feet], [Co<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>nvertTo-Kilometers, ConvertTo-Kilometers]&#8230;}<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">ExportedCmdlets<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: {}<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">NestedModules<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: {}<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">RequiredModules<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: {}<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">ExportedVariables<span>&nbsp;&nbsp; <\/span>: {}<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">ExportedAliases<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: {[CTCS, CTCS], [CTFH, CTFH], [CTFT, CTFT], [CTKM, CTKM]&#8230;}<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">SessionState<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: System.Management.Automation.SessionState<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">OnRemove<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>:<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">ExportedFormatFiles : {}<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">ExportedTypeFiles<span>&nbsp;&nbsp; <\/span>: {}<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">&nbsp;<\/span><\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">PS C:&gt;<\/span><\/span>\n<span style=\"font-size:10.0pt\">&nbsp;<\/span>\n<span style=\"font-size:10.0pt\">MT, you need to keep a couple of things in mind. The first thing is that a Windows PowerShell module is basically a script (in our particular application) and that the Script Execution policy must be set so that script execution is permitted. If the script execution policy is set to the default level of <i>restricted<\/i> an error will be generated (even if the logged on user is an Administrator). Fortunately, the error that is returned informs one of that fact. Even if the execution policy is set to <i>restricted <\/i>on a particular machine, you can always run a Windows PowerShell script (or module) if you start Windows PowerShell with the <i>bypass<\/i> option. The command to do this is seen here.<\/span><\/p>\n<p class=\"CodeBlock\" style=\"margin-left:1.0in\"><span style=\"font-size: 10pt\"><span style=\"font-family: courier new,courier\">powershell -executionpolicy bypass<\/span><\/span>\n<span style=\"font-size:10.0pt\">&nbsp;<\/span>\n<span style=\"font-size:10.0pt\">One of the really cool uses of a shared module is to permit centralization of <a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/tags\/windows+powershell\/profiles\/\">Windows PowerShell Profile<\/a><\/span><span class=\"MsoHyperlink\"><span style=\"font-size:  10.0pt;font-family:'Segoe','sans-serif'\">s<\/span><\/span><span style=\"font-size:  10.0pt\"> for networked users. To do this, the profile on the local computer would simply import the shared module. In this way, I only need to modify one module in one location to permit updates for all the users on the network. I talked about using a module to simplify a <a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2010\/09\/05\/how-to-create-a-customizable-profile-for-the-powershell-ise.aspx\">Windows PowerShell ISE Profile<\/a> in the <a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2010\/11\/06\/weekend-scripter-clean-up-your-powershell-ise-profile-by-using-a-module.aspx\">Weekend Scripter: Clean up your PowerShell ISE Profile by using a Module<\/a> post.<\/span><\/p>\n<p class=\"CodeBlock\"><span style=\"font-size:10.0pt\"><span>&nbsp;<\/span><\/span>\n<span style=\"font-size:10.0pt\">MT, that is all there is to using a module from a centralized file share. Storage of scripts week will continue tomorrow when I will talk about logon scripts. <\/span>\n<span style=\"font-size:10.0pt\">I invite you to follow me on <a target=\"_blank\" href=\"http:\/\/bit.ly\/scriptingguystwitter\">Twitter<\/a> or <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\">Facebook<\/a>. If you have any questions, send email to me at <a target=\"_blank\" href=\"http:\/\/blogs.technet.commailto:scripter@microsoft.com\">scripter@microsoft.com<\/a> or post them on the <a href=\"http:\/\/social.technet.microsoft.com\/Forums\/en\/ITCG\/threads\/\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/span>\n<span style=\"font-size:10.0pt\">&nbsp;<\/span>\n<b><span style=\"font-size:10.0pt\">Ed Wilson, Microsoft Scripting Guy<\/span><\/b><span style=\"font-size:10.0pt\">&nbsp;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp; Summary: Simplify your desktop configuration needs by using a Windows PowerShell module stored on a central file share. &nbsp; Hey, Scripting Guy! I enjoy using Windows PowerShell modules. I think they are way cool. The thing is, I am not too keen on deploying them to remote workstations. What would be great is if [&hellip;]<\/p>\n","protected":false},"author":595,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[51,52,3,4,45],"class_list":["post-16001","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-getting-started","tag-modules","tag-scripting-guy","tag-scripting-techniques","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>&nbsp;&nbsp; Summary: Simplify your desktop configuration needs by using a Windows PowerShell module stored on a central file share. &nbsp; Hey, Scripting Guy! I enjoy using Windows PowerShell modules. I think they are way cool. The thing is, I am not too keen on deploying them to remote workstations. What would be great is if [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/16001","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\/595"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=16001"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/16001\/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=16001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=16001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=16001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}