Login | |
|
 |
RE: return LDAP query for logged in user. - 7/23/2007 7:08:33 AM
|
|
 |
|
| |
dm_4ever
Posts: 2663
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
|
Dim adSysInfo : Set adSysInfo = CreateObject("ADSystemInfo") Dim objUser : Set objUser = GetObject("LDAP://" & adSysInfo.UserName) WScript.Echo objUser.displayName
_____________________________
dm_4ever My philosophy: K.I.S.S - Keep It Simple Stupid Read Me: http://www.visualbasicscript.com/m_24727/tm.htm Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm
|
|
| |
|
|
|
 |
RE: return LDAP query for logged in user. - 8/5/2007 12:50:58 PM
|
|
 |
|
| |
DiGiTAL.SkReAM
Posts: 1184
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
|
Instead of tricking it into thinking another user is logged on, you might want to get the DN for a user and use that instead of the logged on user. I use this http://www.visualbasicscript.com/fb.aspx?m=48443 to do my LDAP queries. I have optimized that code a bit for performance on my own systems, but it is portable enough to use anywhere and work as it is. It should give you a better idea of how to structure the queries to get what you want.
_____________________________
"Would you like to touch my monkey?" - Dieter (Mike Meyers) "It is better to die like a tiger, than to live like a pussy." -Master Wong, from Balls of Fury
|
|
| |
|
|
|
|
|