Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to clear "Logon Script" field in AD by using VBScript?

Status
Not open for further replies.

Chiangmai

MIS
Jan 22, 2003
2
US
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 &quot;scriptPath&quot;, &quot;&quot; ' <====== error line
user.SetInfo
'===============================
Any suggestion ?
 
use:

user.Put &quot;scriptPath&quot;, &quot; &quot;

and your problems will be gone.

Thanks,
Sunny
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top