I\'m running Windows 7 with PowerShell 2 installed.
I\'ve downloaded version 2.1 from here - http://pscx.codeplex.com/releases
The Release notes say
After spending lot of time searching here and there, i found this blog has very clear steps to solve. try it may helps u ..
http://blogs.technet.com/b/heyscriptingguy/archive/2011/07/18/install-the-pscx-and-80-new-cmdlets-to-ease-powershell-use.aspx
I hadn't actually completed the last step of my above question completely which turned out to be the answer.
Here is that answer for completeness
Pscx-2.1.0/Pscx-2.1.0/{lots of files}
Pscx-2.1.0/Pscx/{lots of files}
(Get-ChildItem Env:\PSModulePath).Value
and note the modules folder location.Pscx folder
to the Modules folder location given above.In PowerShell 5.0, you can do:
Find-Package pscx | ? ProviderName -eq PSModule | Install-Package -Force
The -Force
parameter will cause it to upgrade if an older version is already installed.
In PowerShell 5.1, you'll need:
Find-Package pscx | ? ProviderName -eq PowerShellGet | Install-Package -Force
or
Find-Package pscx -ProviderName PowerShellGet | Install-Package -Force
or just
Install-Package pscx -Force
You can also use PsGet to easily search and install PowerShell modules.
You can check which modules have been added to PsGet by browsing for all modules:
> Get-PsGetModuleInfo *
Or locate this one specfically:
> Get-PsGetModuleInfo pscx
Then you can install based on that information:
> Install-Module pscx
Just run
choco install pscx
See chocolatey.org for a one-liner to get the choco
command.
Keep in mind you may still have to call this in your scripts before running their commands:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser #allows scripts to run from the interwebs, such as pcsx