【資訊】POWERSHELL指令-
Get-CimInstance
| 查詢資訊的名稱 | pw scripts |
|---|---|
|
電腦名稱 |
Get-CimInstance -ClassName Win32_ComputerSystem |
|
網路資訊 |
Get-CIMINSTANCE -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=$true | Select-Object -Property [a-z]* -ExcludeProperty IPX*,WINS* | Format-Table -Property IPAddress |
|
電腦的OS版本 |
Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -Property BuildNumber,Caption,BuildType,Installdate,WindowsDirectory,OSType,ServicePackMajorVersion,ServicePackMinorVersion |
| 更新安裝過的版本 | Get-CimInstance -ClassName Win32_QuickFixEngineering |
| 最近一次更新紀錄 | 待確認 |
| 現在登入帳號是誰 | Get-CimInstance -ClassName Win32_ComputerSystem -Property UserName |
| 是否具本機管理員權限 | 待確認 |
| 是否開啟USB權限 | 待確認 |
