Moordoom
02-17-2006, 09:34 AM
I need to get some information from about 1200 PCs across our WAN. The info is the User name, Computer name and Service tag (They are all Dells). I use the following script to get my info
'--------------------------------------------
' Service Tag Machine Name Save script
Set WshNetwork = WScript.CreateObject("WScript.Network")
on error resume next
strComputer = "."
Set objWMIservice = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
For each objitem in colitems
WScript.Echo "Computer Name = " & WshNetwork.ComputerName & VBCrLf _
& "User Name = " & WshNetwork.UserName & VBCrLf _
& "Dell Service Tag: " & objitem.serialnumber
'
NEXT
'----------------------------------------------
What I need help with is I need to append this information to a file (txt or xls). This way I can push this script out to all my PCs and retrieve this information.
Any help out there available?
'--------------------------------------------
' Service Tag Machine Name Save script
Set WshNetwork = WScript.CreateObject("WScript.Network")
on error resume next
strComputer = "."
Set objWMIservice = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colitems = objWMIservice.ExecQuery("Select * from Win32_BIOS",,48)
For each objitem in colitems
WScript.Echo "Computer Name = " & WshNetwork.ComputerName & VBCrLf _
& "User Name = " & WshNetwork.UserName & VBCrLf _
& "Dell Service Tag: " & objitem.serialnumber
'
NEXT
'----------------------------------------------
What I need help with is I need to append this information to a file (txt or xls). This way I can push this script out to all my PCs and retrieve this information.
Any help out there available?