Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. $originalpaths = (Get-ItemProperty -Path ‘Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name PSModulePath).PSModulePath
  2.  
  3. # Add your new path to below after the ;
  4.  
  5. $newPath=$originalpaths+’;C:\PowerShell\Modules\’
  6.  
  7. Set-ItemProperty -Path ‘Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name PSModulePath –Value $newPath
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement