Reputation: 8352
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
I was unsure what $env:Home was so a bit of searching determined that the release notes are expecting an environment variable called Home which doesn't exist on my machine.
A bit more searching says use what is defined as ~
on my machine. So in a PS prompt I run cd ~
Which on my machine led to a network drive U:
I created the following directories U:\Documents\WindowsPowerShell\Modules
and copied the extracted Pscx-2.1.0 to the Modules folder. Opened a PowerShell prompt and typed Get-Module -ListAvailable
. This didn't give me Pscx in the results.
The above steps actually gave me this folder tree U:\Documents\WindowsPowerShell\Modules\Pscx-2.1.0\Pscx-2.1.0
So I copied the files up a level and tried again with U:\Documents\WindowsPowerShell\Modules\Pscx-2.1.0\
and also tried with U:\Documents\WindowsPowerShell\Modules\Pscx\
I also tried all of the above with this path U:\WindowsPowerShell\Modules\Pscx-2.1.0\
I'm guessing that the Modules aren't actually supposed to be in this directory, so a bit more searching leads to this command. (Get-ChildItem Env:\PSModulePath).Value
which gives the following result
C:\Users\my.name\Documents\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
So I copy the Pscx-2.1.0 folder to here C:\Users\my.name\Documents\WindowsPowerShell\Modules\Pscx-2.1.0
And still no luck.
What step am I missing?
Upvotes: 15
Views: 22801
Reputation: 29839
Update: Looks like PsGet is no longer maintained, but source is still available on github.
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
Upvotes: 2
Reputation: 16056
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
Upvotes: 9
Reputation: 1
After spending lot of time searching here and there, i found this blog has very clear steps to solve. try it may helps u ..
Upvotes: 0
Reputation: 7088
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
Upvotes: 4
Reputation: 8352
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.Upvotes: 12