Installation issue

Topics: User Forum
Feb 16, 2013 at 8:27 AM
Edited Feb 16, 2013 at 8:32 AM
Hi
I'm having a strange installation issue (and I've had it only on this one machine): basically, this is a W7 x64 install, and no matter where I put the pscx files:
c:\windows\system32\windowspowershell\v1.0\Modules\
c:\windows\syswow64\windowspowershell\v1.0\Modules\
c:\users\mark\Documents\WindowsPowerShell\Modules\

when I try to import the module, I get a file not found error even tho the files are there:

Import-Module : The specified module 'Pscx' was not loaded because no valid module file was found in any module directory.
At line:1 char:14
+ import-module <<<<  Pscx
    + CategoryInfo          : ResourceUnavailable: (Pscx:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Comm
   ands.ImportModuleCommand
Image

now I'm surely missing something, and I beg everyone pardon, but I'm banging my head at this since a couple of hours and I can't install.. what I'm doing wrong?
Thanks everyone!

Btw: If I specify the FULL path to the pscx files, it does find it, but that's not how it should work.. I would want to install for every user. here's my $env:psmodulepath:
PS C:\> $env:psmodulepath
C:\Users\Mark\Documents\WindowsPowerShell\Modules;C:\Windows\system32\Windo
wsPowerShell\v1.0\Modules\
Feb 16, 2013 at 3:08 PM
Edited Feb 16, 2013 at 3:09 PM
Did you try putting everything in a folder called Pscx in your Module path?

E.g. C:\Users\Mark\Documents\WindowsPowerShell\Modules\Pscx\
Feb 16, 2013 at 4:19 PM
Thanks for the advice!
It din't work at first.. the readme file was a bit confusing, as the folder inside the zip file is named pscx2.21 and so it did not match the the instructions.
Many thanks for the help!
Coordinator
Feb 16, 2013 at 5:05 PM
This has happened to a couple of folks now. I just uploaded a new ZIP still named Pscx-2.1.1.zip but the folder inside the zip is called Pscx. That should hopefully help folks avoid this issue. Sorry for the inconvenience.
Feb 17, 2013 at 5:03 PM
Thanks for your comprehension.. I was puzzled because I clearly remembered being able to install it some (months? year?) ago, but I could not figure out what I was doing wrong!
If I understand correctly, the PSCX 3.0 uses a different (MSI) way of installing.. wouldn't be easier if 2.x branch did it the same way?
Again, thanks
Coordinator
Feb 17, 2013 at 9:10 PM
At this point, the 2.1 branch is pretty much done other than bug fixes. BTW previous to 2.x we provided an MSI but then got a number of complaints that folks wanted xcopy which is why 2.x is provided in xcopy form. We learned enough about the pitfalls of xcopy deployment that we didn't make that mistake again for 3.0. :-)
Sep 19, 2013 at 5:27 PM
I am having this exact same problem - and I only just downloaded the zip file today and am using Powershell 2.0. I unzip it into the same location as other modules, such as WebAdministration - which works just fine - \Windows\System32\WindowsPowerShell\v1.0\Modules and it creates the Pscx folder for me when it extracts. but once all the files are extracted, I type Import-Module Pscx and I get the exact same message as ilgrank was getting above. Any ideas?
Coordinator
Sep 20, 2013 at 2:16 AM
If you install in \Windows\System32\WindowsPowerShell\v1.0\Modules then you can only load PSCX from a 64-bit PowerShell (Windows PowerShell x64). If you are trying to load from PowerShell x86 you also need to install into \windows\syswow64\WindowsPowershell\v1.0\Modules. However, this is all simplified if you install into your profile's Modules dir at $home\Documents\WindowsPowerShell\Modules. If you install into this location, you can load from both x86 and x64 PowerShell.
Sep 20, 2013 at 2:05 PM
r_keith_hill wrote:
If you install in \Windows\System32\WindowsPowerShell\v1.0\Modules then you can only load PSCX from a 64-bit PowerShell (Windows PowerShell x64). If you are trying to load from PowerShell x86 you also need to install into \windows\syswow64\WindowsPowershell\v1.0\Modules. However, this is all simplified if you install into your profile's Modules dir at $home\Documents\WindowsPowerShell\Modules. If you install into this location, you can load from both x86 and x64 PowerShell.
Thank you. The $home\Documents\WindowsPowerShell\Modules was coming back as "invalid", so I went via sysWOW64 and was then able to import the module.

Thank you again!