Update powershell.md

This commit is contained in:
Alexander 2024-09-14 17:36:28 -04:00 committed by GitHub
parent 8d452d4f45
commit 5ed00bc281
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -126,6 +126,21 @@ Get-WmiObject -Class Win32_OperatingSystem
Get-CimInstance -ClassName CIM_Processor | Where-Object {$_.'DeviceID' -eq 'CPU0'} | ft -hide
```
### To extract CPU information only
```
Get-CimInstance -ClassName CIM_Processor | Select Caption | ft -hide
```
### To extract CPU name only
```
Get-CimInstance -ClassName CIM_Processor | Select Name | ft -hide
```
### To extract CPU manufacturer only
```
Get-CimInstance -ClassName CIM_Processor | Select Manufacturer | ft -hide
```
### Cim-Class List
To get full list of CimClass, run `Get-CimClass`