How to use PSCX with Sapien Powershell Studio

Topics: User Forum
Jul 2, 2013 at 1:32 AM
I've installed V3 of the extensions, however, don't know how to use them from within Sapien Powershell Studio. Thanks in advance for any guidance.
Jul 2, 2013 at 7:40 PM
Anyone???? I've imported the library at the console, however cannot access the commands from within the IDE.
Coordinator
Jul 2, 2013 at 8:03 PM
Edited Jul 2, 2013 at 8:05 PM
I haven't used that product lately but in general you would execute "Import-Module Pscx" and then start using the Pscx commands. However, the WiX based installer has an issue where it modifies the PSModulePath environment variable (so PowerShell can find the Pscx module's installation directory) but the update doesn't get propagated. You may need to sign out and back in OR specify the full path to the Pscx.psd1 file to the import command e.g.:

Import-Module 'C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx\Pscx.psd1'

If you want PSCX to always be available in the Sapien product then it should have a specially named profile script - something like SapienPowerShellStudio_profile.ps1. Put the Import-Module command in that profile script and restart the Sapien product.
Jul 6, 2013 at 11:06 PM
Thanks for the reply. I could not get it working so I gave up -- no time to mess with this right now. And besides, I've been able to develop a pretty good script without the extensions. If someone can fix the installer I might try it again.