First, a little about my background. We have win2k and XP machines here. Some of the XP were upgraded from 2k.
Below is my script which works on SOME XP machines, but not others. I haven't tested it on 2k yet, but I don't know why it wouldn't work.
p.s. Before I tested it, I made sure the PC's were turned on by pinging them first. And another thing is that I'm using the NAME of the PC and not the IP.
computerName = inputbox("Input a Machine Name")
wmiRoot = "winmgmts:\\" & computerName & "\root\cimv2"
wmiQuery = "Select * from Win32_OperatingSystem"
set objWMIOS = getobject(wmiroot)
set colOS = objWMIOS.ExecQuery(wmiQuery)
For Each objOS in colOS
wscript.echo objOS.name
Next
wmiQuery = "Select * from Win32_ComputerSystem"
set objWMIRAM = getobject(wmiroot)
set colRAM = objwmiram.execquery(wmiQuery)
For Each objRAM in colRAM
wscript.echo objRAM.TotalPhysicalMemory / 1024 / 1024
Next
Below is my script which works on SOME XP machines, but not others. I haven't tested it on 2k yet, but I don't know why it wouldn't work.
p.s. Before I tested it, I made sure the PC's were turned on by pinging them first. And another thing is that I'm using the NAME of the PC and not the IP.
computerName = inputbox("Input a Machine Name")
wmiRoot = "winmgmts:\\" & computerName & "\root\cimv2"
wmiQuery = "Select * from Win32_OperatingSystem"
set objWMIOS = getobject(wmiroot)
set colOS = objWMIOS.ExecQuery(wmiQuery)
For Each objOS in colOS
wscript.echo objOS.name
Next
wmiQuery = "Select * from Win32_ComputerSystem"
set objWMIRAM = getobject(wmiroot)
set colRAM = objwmiram.execquery(wmiQuery)
For Each objRAM in colRAM
wscript.echo objRAM.TotalPhysicalMemory / 1024 / 1024
Next