Powered by GeSHi

Source code for bios.ps1

(view source code of bios.ps1 as plain text)

  1. # WMI query to list all properties and values of the Win32_BIOS class
  2. # This PowerShell script was generated using the WMI Code Generator, Version 1.30
  3. # http://www.robvanderwoude.com/updates/wmigen.html
  4.  
  5. param( [string]$strComputer = "." )
  6.  
  7. $colItems = get-wmiobject -class "Win32_BIOS" -namespace "root\CIMV2" -computername $strComputer
  8.  
  9. foreach ($objItem in $colItems) {
  10. 	write-host "Name                           :" $objItem.Name
  11. 	write-host "Version                        :" $objItem.Version
  12. 	write-host "Manufacturer                   :" $objItem.Manufacturer
  13. 	write-host "SMBIOSBIOS Version             :" $objItem.SMBIOSBIOSVersion
  14. 	write-host
  15. }
  16.