Error loading Pscx

Topics: User Forum
Nov 27, 2012 at 5:56 PM

I'm attempting to load Pscx in PowerGUI, and am getting the following message:

The 'C:\Program Files (x86)\PowerShell Community Extensions\Pscx3\Pscx\Pscx.psd1' module cannot be imported because its manifest contains one or more members that are not valid. The valid manifest members are ('ModuleToProcess', 'NestedModules', 'GUID', 'Author', 'CompanyName', 'Copyright', 'ModuleVersion', 'Description', 'PowerShellVersion', 'PowerShellHostName', 'PowerShellHostVersion', 'CLRVersion', 'DotNetFrameworkVersion', 'ProcessorArchitecture', 'RequiredModules', 'TypesToProcess', 'FormatsToProcess', 'ScriptsToProcess', 'PrivateData', 'RequiredAssemblies', 'ModuleList', 'FileList', 'FunctionsToExport', 'VariablesToExport', 'AliasesToExport', 'CmdletsToExport'). Remove the members that are not valid ('RootModule'), then try to import the module again.

 

I'm on PS version 3, Windows 7 64-bit:

PS C:\Windows\SysWOW64> $Host.Version
Major  Minor  Build  Revision-----  -----  -----  --------3      2      0      2237    

Developer
Nov 27, 2012 at 6:56 PM

Running $host.version is telling you the version of the host, not the powershell engine. The host in this case is PowerGUI. If you want to see the version of the powershell engine being used by powergui, run $psversiontable from within powergui.

Here's what I see from within the native powershell.exe 3.0 host:

PS C:\projects> $psversiontable              
                                             
Name                           Value         
----                           -----         
PSVersion                      3.0           
WSManStackVersion              3.0           
SerializationVersion           1.1.0.1       
CLRVersion                     4.0.30319.18010
BuildVersion                   6.2.9200.16434
PSCompatibleVersions           {1.0, 2.0, 3.0}
PSRemotingProtocolVersion      2.2           
                                             
                                             
PS C:\projects> $host.version                
                                             
Major  Minor  Build  Revision                
-----  -----  -----  --------                
3      0      -1     -1                    

$psversiontable.psversion is the actual powershell version. You should also have a CLR version of 4.0.*  

Nov 27, 2012 at 7:18 PM
Edited Nov 27, 2012 at 7:22 PM

Thanks for that info.

 

PS C:\Windows\SysWOW64> $psversiontable 

Name                           Value                                                                                       
----                           -----                                                                                       
PSVersion                      2.0                                                                                         
PSCompatibleVersions           {1.0, 2.0}                                                                                  
BuildVersion                   6.1.7601.17514                                                                              
PSRemotingProtocolVersion      2.1                                                                                         
WSManStackVersion              2.0                                                                                         
CLRVersion                     4.0.30319.296                                                                               
SerializationVersion           1.1.0.1                                                                                    

 

From Powershell ISE:

PS C:\> $psversiontable 

Name                           Value                                                                                                                                     
----                           -----                                                                                                                                     
WSManStackVersion              3.0                                                                                                                                       
PSCompatibleVersions           {1.0, 2.0, 3.0}                                                                                                                           
SerializationVersion           1.1.0.1                                                                                                                                   
BuildVersion                   6.2.9200.16398                                                                                                                            
PSVersion                      3.0                                                                                                                                       
CLRVersion                     4.0.30319.296                                                                                                                             
PSRemotingProtocolVersion      2.2 

Anything else I need to do to make sure 3.0 is being used within PowerGUI? 

 

 

Developer
Nov 27, 2012 at 7:31 PM

Try looking on the PowerGUI forums - I'm not sure how you can force PS 3.0 with their application. It might be as simple as changing/adding a .config file, but it might be more involved, or impossible.

Nov 27, 2012 at 7:33 PM

I will check there. Thank you. 

Nov 27, 2012 at 7:56 PM
Edited Nov 27, 2012 at 7:57 PM

Found a workaround here: http://powergui.org/thread.jspa?threadID=19411

 

Start the ScriptEditor with the parameter "-version 3.0":

"C:\...\PowerGUI\ScriptEditor.exe" -version 3.0

Then you will get:

PS C:\Users\a0048052\Documents> $PSVersionTable

Name Value 
---- ----- 
WSManStackVersion 3.0 
PSCompatibleVersions {1.0, 2.0, 3.0} 
SerializationVersion 1.1.0.1 
BuildVersion 6.2.9200.16398 
PSVersion 3.0 
CLRVersion 4.0.30319.296 
PSRemotingProtocolVersion 2.2