The following script reads a value in the AD which is okay.
Set adsSystemInfo = CreateObject("ADSystemInfo"
Set User = getobject("LDAP://OU=Users,DC=mydomain,DC=com"
strCurrentDrive = User.HomeDrive
strCurrentDrivePath = User.HomeDirectory
User.SetInfo
The following code updates an existing value and this works.
Set adsSystemInfo = CreateObject("ADSystemInfo"
Set User = getobject("LDAP://OU=Users,DC=mydomain,DC=com"
User.HomeDrive = "H:"
User.HomeDirectory = "\\server\user\fred"
User.SetInfo
The following code generates the error indictated at the bottom. It seems I cannot blank an entry in the AD. Any ideas how I can achieve this ?
Set adsSystemInfo = CreateObject("ADSystemInfo"
Set User = getobject("LDAP://OU=Users,DC=mydomain,DC=com"
User.HomeDrive = empty
User.HomeDirectory = empty
User.SetInfo
ERROR : Unspecified error
Code: 80004005
Source: (Null)
Thanks in advance.
Rich
Set adsSystemInfo = CreateObject("ADSystemInfo"
Set User = getobject("LDAP://OU=Users,DC=mydomain,DC=com"
strCurrentDrive = User.HomeDrive
strCurrentDrivePath = User.HomeDirectory
User.SetInfo
The following code updates an existing value and this works.
Set adsSystemInfo = CreateObject("ADSystemInfo"
Set User = getobject("LDAP://OU=Users,DC=mydomain,DC=com"
User.HomeDrive = "H:"
User.HomeDirectory = "\\server\user\fred"
User.SetInfo
The following code generates the error indictated at the bottom. It seems I cannot blank an entry in the AD. Any ideas how I can achieve this ?
Set adsSystemInfo = CreateObject("ADSystemInfo"
Set User = getobject("LDAP://OU=Users,DC=mydomain,DC=com"
User.HomeDrive = empty
User.HomeDirectory = empty
User.SetInfo
ERROR : Unspecified error
Code: 80004005
Source: (Null)
Thanks in advance.
Rich