2017-10-08 153 views
0

我正在嘗試在PowerShell中使用WMI。爲了連接另一臺電腦,我用新的CimSession在Windows 7上不可用?

$CimSession = New-CimSession -ComputerName 127.0.0.1 

但我得到了一個錯誤:

The term 'New-CimSession' 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 that the path is correct and try again.

任何想法?

回答

1

的Windows 7  來到最初使用PowerShell 2.0版本,而New-CimSession cmdlet的是introduced in PowerShell version 3

您可以使用this download將Windows計算機(SP1或更高版本)升級到PowerShell版本5.1(截止撰寫本文時爲當前版本)。有關可用升級選項see here的概述。

相關問題