Greetings!
This script worked without problems in a 2003 R2 Domain, But when trying to run it in a 2008 domain nothing seems to happen.
On a client when gpresult /R is run Model.vbs is an applied Group Policy Object
Model.vbs :
'-----------------------------------------------------------------------
' Created 3/29/2011
' When used as login script it will populate the Computer Description
' in Active Directory with UserName, Serial Number & Computer Model
' ----------------------------------------------------------------------
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colcomputersystem = objWMIService.ExecQuery _
("Select * from Win32_computersystem")
Set colBIOS = objWMIService.ExecQuery _
("Select * from Win32_BIOS")
For each objcomputersystem in colcomputersystem
Getcomputersystem = objcomputersystem.Model
Next
For each objBIOS in colBIOS
GetSerialNumber = objBIOS.SerialNumber
Next
Set objSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
Set objComputer = GetObject("LDAP://" & objSysInfo.ComputerName)
strMessage = objUser.CN & " / " & GetSerialNumber & " / " & Getcomputersystem
objComputer.Description = strMessage
objComputer.SetInfo