jmair Posted August 23, 2011 Posted August 23, 2011 I have been using a VBscript login script that grabs the OU the account is in, then does certain things (mounts printers, creates shares etc.) I dont recal doing anything over the summer, but when I came back to school the script is now failing. It looks like it's not seeing our domain on this line. Set objUser = GetObject("LDAP://" & strUserName) Here is a compact version of the script I use (the portion that's giving the error). Set objSysInfo = CreateObject("ADSystemInfo") strUserName = objSysInfo.UserName Set objUser = GetObject("LDAP://" & strUserName) strOUName = objUser.Parent Set objOU = GetObject(strOUName) Wscript.Echo objOU.distinguishedName Here's an image of the error I get while running the above script now. Any suggestions on how to resolve this would be welcome.
Steve21 Posted August 23, 2011 Posted August 23, 2011 (edited) Does the snippet you posted reference the error? Or was there some before it. *Edit - Try setting it to a LDAP://"domain name" incase it's not registering properly Steve Edited August 23, 2011 by Steve21
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now