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.
Here is a compact version of the script I use (the portion that's giving the error).Code:Set objUser = GetObject("LDAP://" & strUserName)
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.Code:Set objSysInfo = CreateObject("ADSystemInfo") strUserName = objSysInfo.UserName Set objUser = GetObject("LDAP://" & strUserName) strOUName = objUser.Parent Set objOU = GetObject(strOUName) Wscript.Echo objOU.distinguishedName
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
Last edited by Steve21; 23rd August 2011 at 07:35 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)