Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


how to show all object IDs from object?

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> how to show all object IDs from object?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 how to show all object IDs from object? - 5/5/2008 11:32:14 PM   
  tomas

 

Posts: 11
Score: 0
Joined: 1/2/2008
Status: offline
Hi,

I'm really struggling with objUser.
from

Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)


By pure luck and some websites I've managed to find following;
objUser.FirstName
objUser.LastName
objUser.Title
objUser.TelephoneNumber
objUser.Mobile

My question;

Is there any way of echoing all ID's with values for objUser?

Thanks!
 
 
Post #: 1
 
 RE: how to show all object IDs from object? - 5/6/2008 12:14:03 AM   
  dm_4ever


Posts: 2220
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
To find the properties available for a User object you should have started by looking at the ADSI Edit tool or AD Explorer...both available from MS.

_____________________________

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

(in reply to tomas)
 
 
Post #: 2
 
 RE: how to show all object IDs from object? - 5/6/2008 1:42:25 AM   
  tomas

 

Posts: 11
Score: 0
Joined: 1/2/2008
Status: offline
Hey,
Thanks for the suggestion I've managed to get all the user object information via active directory explorer. I'm having a slight issue still... in active directory explorer under user properties I'm seeing mail attribute with a email value i.e. john.smith@company.com. I'm not getting that on my vbs script.

On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)

' Declare AD vars
strFirstName = objUser.FirstName
strLastName = objUser.LastName
strTitle = objUser.Title
strPhone = objUser.TelephoneNumber
strMobile = objUser.Mobile
strEmail = objUser.mail

If I try other object attributes i.e. info or l works fine... Do you know why wouldn't email work?

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: how to show all object IDs from object? - 5/6/2008 1:52:07 AM   
  tomas

 

Posts: 11
Score: 0
Joined: 1/2/2008
Status: offline
er... it works now! Thanks for your help

(in reply to tomas)
 
 
Post #: 4
 
 RE: how to show all object IDs from object? - 5/6/2008 2:03:10 AM   
  dm_4ever


Posts: 2220
Score: 32
Joined: 6/29/2006
From: Orange County, California
Status: offline
No problem.  

There may be properties that you can't simply display without a little extra work...AD explorer makes it look easy by handling the various data types automatically for you to display it in a human readable format.

_____________________________

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

(in reply to tomas)
 
 
Post #: 5
 
 
 
  

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 >> how to show all object IDs from object? Page: [1]
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