Hello,
I would like to run a script eithe at startup or login that pulls the username and model name of a desktop into the descriptio field of the computer object of Active directory...
I have the following code to extract the info:
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2"
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
For Each objItem in colItems
Wscript.Echo "Model: " & objItem.Model
Wscript.Echo "UserName: " & objItem.UserName
Next
But I'm having real troube Writing to AD
if anyone can help i would be most greatfull
Regards
Rob
I would like to run a script eithe at startup or login that pulls the username and model name of a desktop into the descriptio field of the computer object of Active directory...
I have the following code to extract the info:
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2"
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
For Each objItem in colItems
Wscript.Echo "Model: " & objItem.Model
Wscript.Echo "UserName: " & objItem.UserName
Next
But I'm having real troube Writing to AD
if anyone can help i would be most greatfull
Regards
Rob