I would like to clear "Logon Script" field in AD by using VBScript. But it doesn't work because I can't set it to null or "". Please see my script.
'===============================
Dim user
dim userPath
userID = InputBox("User id", "input user id:", ""
userPath = "LDAP://cn=" + userID +",ou=Admins Users,dc=mycompany,dc=com"
Set user = GetObject(userPath)
user.Put "scriptPath", "" ' <====== error line
user.SetInfo
'===============================
Any suggestion ?
'===============================
Dim user
dim userPath
userID = InputBox("User id", "input user id:", ""
userPath = "LDAP://cn=" + userID +",ou=Admins Users,dc=mycompany,dc=com"
Set user = GetObject(userPath)
user.Put "scriptPath", "" ' <====== error line
user.SetInfo
'===============================
Any suggestion ?