Dim objWMI : Set objWMI = GetObject(“winmgmts:”)
     Dim colSettingsComp : Set colSettings = objWMI.ExecQuery(“Select * from Win32_ComputerSystem”)
     Dim colSettingsBios : Set colSettingsBios = objWMI.ExecQuery(“Select * from Win32_BIOS”)
     Dim objComputer, strModel, strSerial
     For Each objComputer in  colSettings
     strModel = objComputer.Model
     Next
     For Each objComputer in colSettingsBios
     strSerial = objComputer.SerialNumber
     Next
     wscript.echo strModel
     wscript.echo strSerial

 

Set wshNetwork = WScript.CreateObject( “WScript.Network” )
strComputerName = wshNetwork.ComputerName
WScript.Echo “Computer Name: ” & strComputerName
Set wshShell = WScript.CreateObject( “WScript.Shell” )
strComputerName = wshShell.ExpandEnvironmentStrings( “%COMPUTERNAME%” )
WScript.Echo “Computer Name: ” & strComputerName

Advertisements