Skip to content

Instantly share code, notes, and snippets.

@jberezanski
Created June 24, 2016 20:20
Show Gist options
  • Save jberezanski/474d0530b263e37dfdc01ffc3f5c2bdb to your computer and use it in GitHub Desktop.
Save jberezanski/474d0530b263e37dfdc01ffc3f5c2bdb to your computer and use it in GitHub Desktop.
C:\Users\jberezanski>echo %PSModulePath%
C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
C:\Users\jberezanski>powershell -command "$psversiontable; $env:psmodulepath"
Name Value
---- -----
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.42000
BuildVersion 6.3.9600.17400
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2
C:\Users\jberezanski\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\;C:\Program Files\Win
dowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
C:\Users\jberezanski>powershell -version 2 -command "$psversiontable; $env:psmodulepath"
Name Value
---- -----
CLRVersion 2.0.50727.8009
BuildVersion 6.1.7601.18606
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1
C:\Users\jberezanski\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\;C:\Windows\system32\
WindowsPowerShell\v1.0\Modules\
C:\Users\jberezanski>powershell
Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
PS C:\Users\jberezanski> gp 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' PSModulePath
PSModulePath : C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
PSChildName : Environment
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
PS C:\Users\jberezanski> gp HKCU:\Environment PSModulePath
gp : Property PSModulePath does not exist at path HKEY_CURRENT_USER\Environment.
At line:1 char:1
+ gp HKCU:\Environment PSModulePath
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (PSModulePath:String) [Get-ItemProperty], PSArgumentException
+ FullyQualifiedErrorId : System.Management.Automation.PSArgumentException,Microsoft.PowerShell.Commands.GetItemPropertyCommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment