+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, VBS Domain no longer exists? in Coding and Web Development; I have been using a VBscript login script that grabs the OU the account is in, then does certain things ...
  1. #1
    jmair's Avatar
    Join Date
    Aug 2007
    Posts
    274
    Thank Post
    58
    Thanked 9 Times in 9 Posts
    Rep Power
    15

    VBS Domain no longer exists?

    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.
    Code:
    Set objUser = GetObject("LDAP://" & strUserName)
    Here is a compact version of the script I use (the portion that's giving the error).

    Code:
    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.

    error.JPG

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,686
    Thank Post
    333
    Thanked 513 Times in 481 Posts
    Rep Power
    178
    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
    Last edited by Steve21; 23rd August 2011 at 07:35 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 7
    Last Post: 23rd February 2010, 08:12 AM
  2. Replies: 1
    Last Post: 15th February 2007, 07:59 PM
  3. PCs no longer seeing domain
    By Gatt in forum Wireless Networks
    Replies: 8
    Last Post: 15th March 2006, 05:39 AM
  4. New switch - 98 no longer connects
    By mark in forum Wireless Networks
    Replies: 16
    Last Post: 12th November 2005, 02:58 AM
  5. The specified network name is no longer available!
    By mark in forum Wireless Networks
    Replies: 2
    Last Post: 4th November 2005, 02:15 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •