Hi there,
I'm trying to write a script to put the username into the computer object on user logon. (will be called from logon script later)
Unfortunately I get an error saying 80070005 Active Directory: General access denied error
If fails on the last line objComp.SetInfo (of course)
Here's my code:
Set objSysInfo = CreateObject("ADSystemInfo"
Set objComp = GetObject("LDAP://"& objSysInfo.ComputerName)
Set objUser = GetObject("LDAP://"& objSysInfo.UserName)
objComp.put "Description", objUser.displayname
objComp.SetInfo
I'm trying to write a script to put the username into the computer object on user logon. (will be called from logon script later)
Unfortunately I get an error saying 80070005 Active Directory: General access denied error
If fails on the last line objComp.SetInfo (of course)
Here's my code:
Set objSysInfo = CreateObject("ADSystemInfo"

Set objComp = GetObject("LDAP://"& objSysInfo.ComputerName)
Set objUser = GetObject("LDAP://"& objSysInfo.UserName)
objComp.put "Description", objUser.displayname
objComp.SetInfo