Does this work on Windows 2008 R2 64 bit

Mar 16, 2011 at 3:51 PM
Edited Mar 16, 2011 at 4:19 PM

I got this to work easily on my Windows XP machine. I right-clicked the zip file, and then unblocked it. Then extracted the contents to WindowsPowerShell\Modules directory. Finally did a Import-Module Pscx.

Everything worked

Now I went back to the WindowsPowershell\Modules directory and copied the Pscx directory to a Windows 2008 R2 64 bit box. Now the Import-Module Pscx failed with the error message

 

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> Import-Module Pscx
Import-Module : Could not load file or assembly 'Pscx' or one of its dependencies. An argument was out of its legal ran
ge. (Exception from HRESULT: 0x80131502)
At line:1 char:14
+ Import-Module <<<<  Pscx
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

 

I have done my share of googling and tried the following thigs already

 

1. run Powershell as Administrator

2. Copied the contents from c:\Users\me\Documents\WindowsSharePoint\Modules to c:\Windows\System32\WindowsPowerShell\v1.0\Modules

3. Tried the caspol trick mentioned in many places in this forum

Set-Alias CasPol "$([Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())CasPol.exe"
CasPol -polchgprompt off -machine -addgroup 1.2 -url file://c:/windows\system32/WindowsPowerShell/v1.0/Modules/* FullTrust

But still... but still.... If face this problem

4. Join-Path([environment]::GetFolderPath("MyDocuments")) "WindowsPowerShell\Modules"

returns me "C:\Users\me\Documents\WindowsPowerShell\Modules"

5. I also tried doing Set-ExecutionPolicy Unrestricted and then do Import-Module but same error.

Mar 17, 2011 at 8:04 AM

Today I tried again.

I disabled the Enhanced Security configuration of IE on my Windows 2008 R2 box and then downloaded the zip file from code plex.

I right click and go to properties, and there was an "Unblock" button which clicked.

then I extracted the contents to c:\Users\me\Documents\WindowsPowerShell\Modules folder

Now I rightclicked on powershell icon and ran it as Administrator

Now I typed Set-ExecutionPolicy Remotesigned

Got the following message

Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by a
 policy defined at a more specific scope.  Due to the override, your shell will retain its current effective execution
policy of "Unrestricted". Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information
, please see "Get-Help Set-ExecutionPolicy."
At line:1 char:20
+ Set-ExecutionPolicy <<<<  RemoteSigned
    + CategoryInfo          : PermissionDenied: (:) [Set-ExecutionPolicy], SecurityException
    + FullyQualifiedErrorId : ExecutionPolicyOverride,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand

then I tried to Import the module

Import-Module Pscx

Got the following error

Import-Module : Could not load file or assembly 'Pscx' or one of its dependencies. An argument was out of its legal ran
ge. (Exception from HRESULT: 0x80131502)
At line:1 char:14
+ Import-Module <<<<  Pscx
    + CategoryInfo          : InvalidOperation: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

Mar 24, 2011 at 8:57 PM

I'm getting something very similar. This happens for me whether I use RemoteSigned or Unrestricted. I am running Windows Server 2008 R2 Standard, I have disabled the IESEC stuff, I have unblocked the zip file, and have "installed" via xcopy /e .\pscx c:\windows\system32\windowspowershell\v1.0\modules\Pscx\

Import-Module Pscx
Import-Module : Cannot load Windows PowerShell snap-in C:\WINDOWS\system32\WindowsPowerShell\v1.0\Pscx\Pscx.dll because of the following error: Unable to load one or more of
the requested types. Retrieve the LoaderExceptions property for more information.
Loader Exceptions:
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.

This goes on for a while and then.

At line:1 char:14
+ Import-Module <<<<  Pscx
    + CategoryInfo          : ResourceUnavailable: (:) [Import-Module], PSSnapInException
    + FullyQualifiedErrorId : PSSnapInLoadFailure,Microsoft.PowerShell.Commands.ImportModuleCommand

I feel as though I'm missing something incredibly simple and am just not seeing it.

Thanks in advance!

Coordinator
Mar 24, 2011 at 9:06 PM

Are you one 64-bit Windows?  If so, make sure your installing PSCX in both the c:\windows\System32\WindowsPowerShell\v1.0\MODULES\Pscx dir and in the C:\windows\SysWOW64\WindowsPowerShell\v1.0\MODULES\Pscx locations.

Mar 24, 2011 at 9:24 PM

Ok, so running x64 powershell results in those errors above even after xcopying into syswow64. import-module pscx works find on x86 powershell. what else could i be missing? i have UAC off, so i'm running powershell as an admin, any other thoughts?

Thanks!

Coordinator
Mar 24, 2011 at 9:28 PM

Copy to SysWow64 makes the x86 version of PowerShell work.  This error is weird:

C:\WINDOWS\system32\WindowsPowerShell\v1.0\Pscx\Pscx.dll

Because PSCX.dll should be at C:\WINDOWS\system32\WindowsPowerShell\v1.0\MODULES\Pscx\Pscx.dll.

Mar 24, 2011 at 9:35 PM

Ok, I am pasting in an ls of both system32 and syswow64, as well as the output from systeminfo.

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

Administrator@HV7ACCU547 | 15:30:35 | 03-24-2011 | C:\Users\Administrator #
ls C:\Windows\System32\WindowsPowerShell\v1.0\Modules


    Directory: C:\Windows\System32\WindowsPowerShell\v1.0\Modules


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         7/13/2009  11:41 PM            ADRMS
d---s         7/13/2009  11:41 PM            AppLocker
d----         7/13/2009  11:41 PM            BestPractices
d---s         2/25/2011   1:25 PM            BitsTransfer
da---         3/24/2011   2:48 PM            Pscx
d----         7/13/2009  11:37 PM            PSDiagnostics
d----         7/13/2009  11:41 PM            ServerManager
d----         7/13/2009  11:41 PM            TroubleshootingPack
d----         8/14/2010   2:09 AM            WebAdministration


Administrator@HV7ACCU547 | 15:31:05 | 03-24-2011 | C:\Users\Administrator #
ls C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules


    Directory: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d---s         2/25/2011   1:26 PM            BitsTransfer
da---         3/24/2011   3:17 PM            Pscx
d----         7/13/2009  11:37 PM            PSDiagnostics
d----         7/13/2009  11:41 PM            TroubleshootingPack
d----         8/14/2010   2:09 AM            WebAdministration


Administrator@HV7ACCU547 | 15:31:21 | 03-24-2011 | C:\Users\Administrator #
ls C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Pscx\


    Directory: C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Pscx


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
da---         3/24/2011   2:48 PM            Apps
da---         3/24/2011   2:48 PM            FormatData
da---         3/24/2011   2:48 PM            Modules
da---         3/24/2011   2:48 PM            TypeData
-a---         5/12/2010   8:50 PM     713728 7z.dll
-a---         5/12/2010   8:50 PM    1124864 7z64.dll
-a---         5/12/2010   8:50 PM      33356 about_Pscx.help.txt
-a---         5/12/2010   8:50 PM     200704 ICSharpCode.SharpZipLib.dll
-a---         5/12/2010   8:50 PM      53248 Interop.Microsoft.Feeds.Interop.dll
-a---         5/12/2010   8:50 PM     200704 PowerCollections.dll
-a---         5/12/2010   8:50 PM        393 Profile.ps1
-a---         5/12/2010   8:50 PM     192000 Pscx.Core.dll
-a---         5/12/2010   8:50 PM     517632 Pscx.Core.pdb
-a---         5/12/2010   8:50 PM     308736 Pscx.dll
-a---         5/12/2010   8:48 PM    1575258 Pscx.dll-Help.xml
-a---         5/12/2010   8:50 PM     773632 Pscx.pdb
-a---         5/12/2010   9:00 PM       2840 Pscx.psd1
-a---         5/12/2010   8:50 PM       7315 Pscx.psm1
-a---         5/12/2010   8:50 PM       3668 Pscx.UserPreferences.ps1
-a---         5/12/2010   8:50 PM       8978 ReleaseNotes.txt
-a---         5/12/2010   8:50 PM      18432 Trinet.Core.IO.Ntfs.dll
-a---         5/12/2010   8:50 PM      42496 Trinet.Core.IO.Ntfs.pdb


Administrator@HV7ACCU547 | 15:32:31 | 03-24-2011 | C:\Users\Administrator #
ls C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\Pscx


    Directory: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\Pscx


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
da---         3/24/2011   3:17 PM            Apps
da---         3/24/2011   3:17 PM            FormatData
da---         3/24/2011   3:17 PM            Modules
da---         3/24/2011   3:17 PM            TypeData
-a---         5/12/2010   8:50 PM     713728 7z.dll
-a---         5/12/2010   8:50 PM    1124864 7z64.dll
-a---         5/12/2010   8:50 PM      33356 about_Pscx.help.txt
-a---         5/12/2010   8:50 PM     200704 ICSharpCode.SharpZipLib.dll
-a---         5/12/2010   8:50 PM      53248 Interop.Microsoft.Feeds.Interop.dll
-a---         5/12/2010   8:50 PM     200704 PowerCollections.dll
-a---         5/12/2010   8:50 PM        393 Profile.ps1
-a---         5/12/2010   8:50 PM     192000 Pscx.Core.dll
-a---         5/12/2010   8:50 PM     517632 Pscx.Core.pdb
-a---         5/12/2010   8:50 PM     308736 Pscx.dll
-a---         5/12/2010   8:48 PM    1575258 Pscx.dll-Help.xml
-a---         5/12/2010   8:50 PM     773632 Pscx.pdb
-a---         5/12/2010   9:00 PM       2840 Pscx.psd1
-a---         5/12/2010   8:50 PM       7315 Pscx.psm1
-a---         5/12/2010   8:50 PM       3668 Pscx.UserPreferences.ps1
-a---         5/12/2010   8:50 PM       8978 ReleaseNotes.txt
-a---         5/12/2010   8:50 PM      18432 Trinet.Core.IO.Ntfs.dll
-a---         5/12/2010   8:50 PM      42496 Trinet.Core.IO.Ntfs.pdb


Administrator@HV7ACCU547 | 15:32:42 | 03-24-2011 | C:\Users\Administrator #
Import-Module pscx
Import-Module : Cannot load Windows PowerShell snap-in C:\WINDOWS\system32\WindowsPowerShell\v1.0\Pscx\Pscx.dll because of the following error: Unable to load one or more of
the requested types. Retrieve the LoaderExceptions property for more information.
Loader Exceptions:
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specifie
d.
At line:1 char:14
+ Import-Module <<<<  pscx
    + CategoryInfo          : ResourceUnavailable: (:) [Import-Module], PSSnapInException
    + FullyQualifiedErrorId : PSSnapInLoadFailure,Microsoft.PowerShell.Commands.ImportModuleCommand
Administrator@HV7ACCU547 | 15:32:59 | 03-24-2011 | C:\Users\Administrator #
sysinfo
The term 'sysinfo' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify th
at the path is correct and try again.
At line:1 char:8
+ sysinfo <<<<
    + CategoryInfo          : ObjectNotFound: (sysinfo:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Administrator@HV7ACCU547 | 15:33:07 | 03-24-2011 | C:\Users\Administrator #
systeminfo

Host Name:                 HV7ACCU547
OS Name:                   Microsoft Windows Server 2008 R2 Standard
OS Version:                6.1.7601 Service Pack 1 Build 7601
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Server
OS Build Type:             Multiprocessor Free
Registered Owner:          Windows User
Registered Organization:
Product ID:                55041-178-8003163-84973
Original Install Date:     1/31/2011, 3:54:18 PM
System Boot Time:          3/24/2011, 2:10:14 PM
System Manufacturer:       Microsoft Corporation
System Model:              Virtual Machine
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: AMD64 Family 16 Model 9 Stepping 1 AuthenticAMD ~1998 Mhz
BIOS Version:              American Megatrends Inc. 090004 , 3/19/2009
Windows Directory:         C:\Windows
System Directory:          C:\Windows\system32
Boot Device:               \Device\HarddiskVolume1
System Locale:             en-us;English (United States)
Input Locale:              en-us;English (United States)
Time Zone:                 (UTC-07:00) Mountain Time (US & Canada)
Total Physical Memory:     512 MB
Available Physical Memory: 109 MB
Virtual Memory: Max Size:  1,536 MB
Virtual Memory: Available: 536 MB
Virtual Memory: In Use:    1,000 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              \\HV7ACCU547
Hotfix(s):                 25 Hotfix(s) Installed.
                           [01]: KB981391
                           [02]: KB981392
                           [03]: KB977236
                           [04]: KB981111
                           [05]: KB977238
                           [06]: KB977239
                           [07]: KB981390
                           [08]: KB2305420
                           [09]: KB2386667
                           [10]: KB2393802
                           [11]: KB2425227
                           [12]: KB2475792
                           [13]: KB2479628
                           [14]: KB2479943
                           [15]: KB2482017
                           [16]: KB2484033
                           [17]: KB2485376
                           [18]: KB2487426
                           [19]: KB2488113
                           [20]: KB2489256
                           [21]: KB2505438
                           [22]: KB2524375
                           [23]: KB958488
                           [24]: KB976902
                           [25]: KB976932
Network Card(s):           1 NIC(s) Installed.
                           [01]: Microsoft Virtual Machine Bus Network Adapter
                                 Connection Name: Local Area Connection 4
                                 DHCP Enabled:    No
                                 IP address(es)
                                 [01]: 173.248.133.160
                                 [02]: 173.248.133.156
                                 [03]: fe80::f852:fe2f:f5b5:fc10
Administrator@HV7ACCU547 | 15:33:29 | 03-24-2011 | C:\Users\Administrator #

Coordinator
Mar 24, 2011 at 9:55 PM

Hmm, from your x64 PowerShell prompt try importing PSCX using the full path:

Import-Module C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Pscx\Pscx.psd1

Also, check to see if Pscx.dll was previously registered as a snapin (from PSCX 1.x install) under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellSnapIns\Pscx

That shouldn't matter but I can't figure out why PowerShell thinks pscx.dll is directly under the v1.0 directory (where Pscx.Core.dll is not located).

Mar 24, 2011 at 10:01 PM

Same errors running

Import-Module C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules\Pscx

there is no pscx under HKLM\software\microsoft\powershell\1\powershellsnapins

Coordinator
Mar 27, 2011 at 6:49 PM

If I go into my user profile Modules\PSCX dir and rename Pscx.Core.dll and then try to import PSCX I get very similar error messages:

Import-Module : Cannot load Windows PowerShell snap-in C:\Users\Keith\Documents\WindowsPowerShell\Modules\pscx\Pscx.dll
 because of the following error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions prope
rty for more information.
Loader Exceptions:
Could not load file or assembly 'Pscx.Core, Version=2.0.3782.38614, Culture=neutral, PublicKeyToken=null' or one of its
 dependencies. The system cannot find the file specified.
...

But note that PowerShell is seeing PSCX in the right location (*under* Modules):

C:\Users\Keith\Documents\WindowsPowerShell\Modules\pscx\Pscx.dll

For some reason, I can't explain just yet, in your case PowerShell is looking in the wrong directory for Pscx.Core.dll:

C:\WINDOWS\system32\WindowsPowerShell\v1.0\Pscx\Pscx.dll

Note the absence of the *Modules* directory in this path.  What is the value of your $PSModulePath variable?  If you've never set it, it should be $null.

Mar 27, 2011 at 10:52 PM

There is no tab complete for $PSModulePath, when I type it in an hit enter no value is returned.

Administrator@HV7ACCU547 | 16:23:19 | 03-25-2011 | C:\Users\Administrator #
$PSModulePath
Administrator@HV7ACCU547 | 16:51:03 | 03-27-2011 | C:\Users\Administrator #