PowerShell 3.0 RC


Pscx modul WMI failed to load with error "Property 'Get' not available for this object'
Error is in Pscx\Modules\Wmi\Pscx.Wmi.psm1:8 Char:6: if (!$acceleratorsType::Get.ContainsKey($name))
See also : http://connect.microsoft.com/PowerShell/feedback/details/721443/system-management-automation-typeaccelerators-broken-in-v3-ctp2
Closed Oct 17, 2013 at 2:26 PM by r_keith_hill


r_keith_hill wrote Jul 19, 2012 at 4:39 PM

Are you running this on PowerShell 2.0?

r_keith_hill wrote Jul 19, 2012 at 4:43 PM

No, scratch that. The updated PSD1 file won't load into 2.0. Hmm, I've only been testing on Win8 Release Preview and I don't see this error. I fixed this for the latest PowerShell v3 drop a while back. It doesn't look like your Pscx.Wmi.psm1 file is the latest. The relevant code in that file should be:

if ($PSVersionTable.PSVersion.Major -eq 3)
$acceleratorsType = [psobject].Assembly.GetType('System.Management.Automation.TypeAccelerators')
$acceleratorsType = [Type]::GetType('System.Management.Automation.TypeAccelerators')

In the latest version of this file, line 8 is "{".