param( [string]$Computer = "." ) if ( $computer -eq "." ) { $instances = Get-CimInstance -ClassName "Win32_BIOS" -Namespace "root/cimv2" } else { $instances = Get-CimInstance -ClassName "Win32_BIOS" -Namespace "root/cimv2" -ComputerName "$Computer" } $count = ( $instances | Measure-Object ).Count if ( $count -eq 1 ) { Write-Host "1 instance:" } else { Write-Host "$count instances:" } Write-Host foreach ($objItem in $colItems) { write-host "Name :" $objItem.Name write-host "Version :" $objItem.Version write-host "Manufacturer :" $objItem.Manufacturer write-host "SMBIOSBIOS Version :" $objItem.SMBIOSBIOSVersion write-host }
日期:2020-04-11 23:04:32 来源:oir作者:oir