我需要從 powershell 輸出中獲取特定值。我只需要在 poewershell 中獲取數值。
$result =WMIC PATH Win32_Battery Get EstimatedChargeRemaining

uj5u.com熱心網友回復:
wmic您可以使用 PowerShell 內置 cmdlet 來查詢 WMI 和 CIM,而不是使用:
(Get-CimInstance -ClassName Win32_Battery).EstimatedChargeRemaining
請參閱Get-CimInstance官方檔案。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/462226.html
標籤:电源外壳
