寻找64位版本的32位等效WmiObject

时间:2013-04-23 06:54:53

标签: powershell-v3.0

我试图为“win32_computersystem”Get-WmiObject及其属性找到64位版本的等价物?我一直在寻找但找不到它。任何建议将不胜感激..

function GetStatus ($system = $_.name) {
        $userlogon = $null
        $userlogon= gwmi -Class win32_computersystem -ComputerName $system | select -ExpandProperty username -ErrorAction Stop
        }

谢谢,

米奇

1 个答案:

答案 0 :(得分:1)

来自http://msdn.microsoft.com/en-us/library/aa390789.aspx

Generally, provider writers do not include both 32-bit and 64-bit versions of a
provider in the same operating system. If no 64-bit provider exists, a 32-bit provider 
can continue to run through the facilities of WOW64

然后您可以在x64操作系统中使用win32_computersystem

Here你可以找到一个有用的脚本来从x32操作系统远程检索x64操作系统的原始(而不是wow64)注册表值。