Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $originalpaths = (Get-ItemProperty -Path ‘Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name PSModulePath).PSModulePath
- # Add your new path to below after the ;
- $newPath=$originalpaths+’;C:\PowerShell\Modules\’
- 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