Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RE: AD Query / Script Help / Easy

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,55125
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: AD Query / Script Help / Easy
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 [2]
Login
Message << Older Topic   Newer Topic >>
 RE: AD Query / Script Help / Easy - 1/29/2008 3:57:06 AM   
  jrcochranusa


Posts: 27
Score: 0
Joined: 1/30/2007
Status: offline
If I remove:

' Manager property is returned as DN, convert to DisplayName
Set objUser = GetObject ("LDAP://" & CurManager)
CurManagerDisplayName =  objUser.Get("displayname")


The script works perfectly.... I'm able to get all other properties outputted cleanly to a file. It's only when I do the second query for the DisplayName that causes the problem.

Thanks for your help!

_____________________________

Thanks,

jrc

(in reply to ebgreen)
 
 
Post #: 21
 
 RE: AD Query / Script Help / Easy - 1/29/2008 4:00:12 AM   
  ebgreen


Posts: 4971
Score: 31
Joined: 7/12/2005
Status: offline
Put this right before the LDAP query:

WScript.Echo CurManager


Make sure that CurManager is always populated with a valid value.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to jrcochranusa)
 
 
Post #: 22
 
 RE: AD Query / Script Help / Easy - 1/29/2008 5:06:52 AM   
  jrcochranusa


Posts: 27
Score: 0
Joined: 1/30/2007
Status: offline
Ok... it's working. I messed something up, so the last 3-4 posts were all in vain. Sorry...

Anyway, I went with this:

If CurManager Then
Set objUser = GetObject ("LDAP://" & CurManager)
CurManagerDisplayName = ""
CurManagerDisplayName =  objUser.Get("displayname")
Else
CurManagerDisplayName = ""
End If

Thanks for your help...but more importantly, your patience!



_____________________________

Thanks,

jrc

(in reply to ebgreen)
 
 
Post #: 23
 
 
Page:  <<   < prev  1 [2]
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: AD Query / Script Help / Easy Page: <<   < prev  1 [2]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts