PSCX install path not in $env:PSModulePath when running as standard user

Topics: User Forum
Feb 28, 2015 at 4:54 PM
Ok so the PSCX installer adds this location to $env:psmodulepath "C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\". If I run powershell as admin it's there, but if I run as standard user it isn't. What gives?
Coordinator
Feb 28, 2015 at 5:56 PM
Interesting. I suspect if you reboot, the env var will be updated for standard user. I've observed this behavior with standard users after PSCX install. I hadn't tried with an admin prompt after installation. We rely on WiX for creating the installer and apparently since it has to run elevated, it is only affecting the admin env vars at least until you reboot.

FWIW we have PSCSX in the PowerShell gallery so if you have the WMF 5 preview, you can install PSCX with one simple command:
Install-Module Pscx -Scope CurrentUser
Mar 4, 2015 at 10:35 PM
You are correct sir. Restart fixed it. Thanks