Import Module PSCX reloaded

Topics: User Forum
Nov 16, 2010 at 1:41 PM

Hi,

I've read a former discussion on my issue wherein it was said that PowerCollections.dll was missing. In my case, it's there. Nevertheless I get almost the same error:

In ISE I tried to execute

import-module pscx

and got the following output:

PS Z:\> import-module pscxImport-Module : The following error occurred while loading the extended type data file: Microsoft.PowerShell, C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.FeedStore.Type.ps1xml : File skipped because of the following validation exception: File C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.FeedStore.Type.ps1xml cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details..Microsoft.PowerShell, C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.Archive.Type.ps1xml : File skipped because of the following validation exception: File C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.Archive.Type.ps1xml cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details..Microsoft.PowerShell, C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.Reflection.Type.ps1xml : File skipped because of the following validation exception: File C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.Reflection.Type.ps1xml cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details..Microsoft.PowerShell, C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.SIUnits.Type.ps1xml : File skipped because of the following validation exception: File C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.SIUnits.Type.ps1xml cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details..Microsoft.PowerShell, C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.TerminalServices.Type.ps1xml : File skipped because of the following validation exception: File C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.TerminalServices.Type.ps1xml cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details..Microsoft.PowerShell, C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.Wmi.Type.ps1xml : File skipped because of the following validation exception: File C:\Users\bromkamp\Documents\WindowsPowerShell\Modules\pscx\TypeData\Pscx.Wmi.Type.ps1xml cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details..

At line:1 char:14

+ import-module <<<<  pscx

    + CategoryInfo          : InvalidOperation: (:) [Import-Module], RuntimeException

    + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

 

What do I have to do in order to get pscx installed correctly? Any hints are appreciated!

Thanx a lot in advance,

Hartmut

Coordinator
Nov 17, 2010 at 1:29 AM

You either have to have your execution policy set to Unrestricted (not recommended) or to RemoteSigned (recommended) but you have to unblock the PSCX zip file first otherwise your machine will consider it "remote" code and since PSCX isn't signed - it won't run.  Run Get-ExecutionPolicy to see what your system is set to.  Use Set-ExecutionPolicy to change it.