![](/img/trans.png)
[英]In Powershell, how can I correctly use Get-CimInstance to retrieve the IPV6 addresses of respective computers?
[英]How can I get the processor "SocketDesignation" with Get-CimInstance?
由於 Microsoft 已棄用wmic
調用,我如何使用Get-CimInstance
獲取與wmic cpu get SocketDesignation
相同的信息?
Win32_Processor
class具有SocketDesignation
屬性。 此命令對我產生相同的結果:
(Get-CimInstance -ClassName 'Win32_Processor' -Property 'SocketDesignation').SocketDesignation
或者,您可以使用Get-ComputerInfo
cmdlet來獲取Processor
class的實例,這些實例也具有SocketDesignation
屬性:
(Get-ComputerInfo -Property 'CsProcessors').CsProcessors.SocketDesignation
在這兩個命令中, -Property
參數選擇特定的屬性,而不是所有可用的,以出現在結果中。
您只需鍵入以下命令即可。
(Get-CimInstance CIM_Processor).SocketDesignation
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.