This file contains 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
while ($true){ | |
($computer = Read-Host 'Enter a computer name or ctrl + c to quit'), | |
(($os = gwmi Win32_OperatingSystem -co $computer),($bios = gwmi Win32_bios -co $computer) | Out-Null), | |
(New-Object -t PSObject | Add-Member -m NoteProperty -na PSComputerName -va $os.PSComputerName -pa | | |
Add-Member -m NoteProperty -na ServicePackMajorVersion -va $os.ServicePackMajorVersion -pa | | |
Add-Member -m NoteProperty -na Version -va $os.Version -pa | | |
Add-Member -m NoteProperty -na BIOSSerial -va $bios.SerialNumber -pa | ft -a)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment