由于wmicMicrosoft 已棄用呼叫,我如何使用Get-CimInstance來獲取與 相同的資訊wmic cpu get SocketDesignation?
uj5u.com熱心網友回復:
該Win32_Processor班有一個SocketDesignation屬性。此命令對我產生相同的結果:
(Get-CimInstance -ClassName 'Win32_Processor' -Property 'SocketDesignation').SocketDesignation
或者,您可以使用Get-ComputerInfocmdlet獲取Processor類的實體,該類也有一個SocketDesignation屬性:
(Get-ComputerInfo -Property 'CsProcessors').CsProcessors.SocketDesignation
在這兩個命令中,-Property引數是選擇要出現在結果中的特定屬性,而不是所有可用屬性。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/384892.html
