Last active
July 7, 2025 18:56
-
-
Save simstems/da947e028b8fb0a1f7a8d5449a1bc109 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| Invoke-Command -ComputerName REMOTEPC -ScriptBlock { | |
| Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object Name, Manufacturer, Model | |
| Get-CimInstance -ClassName Win32_BIOS | Select-Object -ExpandProperty SerialNumber | |
| } | |
| #> | |
| Invoke-Command -ComputerName REMOTEPC -ScriptBlock { | |
| $sys = Get-CimInstance -ClassName Win32_ComputerSystem | |
| $bios = Get-CimInstance -ClassName Win32_BIOS | |
| [PSCustomObject]@{ | |
| Name = $sys.Name | |
| Manufacturer = $sys.Manufacturer | |
| Model = $sys.Model | |
| SerialNumber = $bios.SerialNumber | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment