Get-ComputerInfo
取得系統和作系統屬性的合併物件。
語法
Default (預設值)
Get-ComputerInfo
[[-Property] <String[]>]
[<CommonParameters>]
Description
此 Cmdlet 只能在 Windows 平臺上使用。
Get-ComputerInfo Cmdlet 會取得系統和作系統屬性的合併物件。
此 Cmdlet 已在 Windows PowerShell 5.1 中引進。
範例
範例 1:取得所有計算機屬性
此命令會從計算機取得所有系統和作系統屬性。
Get-ComputerInfo
範例 2:取得所有電腦版本屬性
此命令會從電腦取得所有版本屬性。
Get-ComputerInfo -Property "*version"
WindowsCurrentVersion : 6.3
WindowsVersion : 2009
BiosBIOSVersion : {LENOVO - 1380, N1FET64W (1.38 ), Lenovo - 1380}
BiosEmbeddedControllerMajorVersion : 1
BiosEmbeddedControllerMinorVersion : 17
BiosSMBIOSBIOSVersion : N1FET64W (1.38 )
BiosSMBIOSMajorVersion : 2
BiosSMBIOSMinorVersion : 8
BiosSystemBiosMajorVersion : 1
BiosSystemBiosMinorVersion : 38
BiosVersion : LENOVO - 1380
OsVersion : 10.0.19043
OsCSDVersion :
OsServicePackMajorVersion : 0
OsServicePackMinorVersion : 0
參數
-Property
指定這個 Cmdlet 顯示的電腦屬性,做為字串陣列。
參數屬性
| 類型: | String[] |
| 預設值: | None |
| 支援萬用字元: | True |
| 不要顯示: | False |
參數集
(All)
| Position: | 0 |
| 必要: | False |
| 來自管線的值: | True |
| 來自管線按屬性名稱的值: | True |
| 來自剩餘引數的值: | False |
CommonParameters
此 Cmdlet 支援一般參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。
輸入
String
您可以使用管線將包含屬性名稱的字串傳送至這個 Cmdlet。
輸出
Microsoft.PowerShell.Management.ComputerInfo
此 Cmdlet 會傳回 ComputerInfo 物件。
備註
PowerShell 包含下列 Get-ComputerInfo的別名:
- 窗戶:
gin
此 Cmdlet 僅適用於 Windows 平臺。