Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: attributes AD account property names
1. Set the login name
2. Change the LDAP path to a valid one in your environment.
------------------------------------ AddExtender("WWADS34I.DLL") ; Set credentials. Account="ACCOUNT WITH ADMIN ACCESS" pwd=AskPassword ("Password", "Enter the Password for %Account%") a=dsSetCredent(Account, pwd) ; Define some constants. MANDATORY = 1 OTIONAL = 2 MANANDOPT = 3 ; An Active Directory example. ; The user object "Russ T Gate" on the "win2000" server. ; Make sure the following on one line sAdsiPath = "LDAP://win2000/CN=Russ T Gate,CN=Users,DC=win2000,DC=windowware,DC=com" Output=FileOpen("C:\temp\out.csv","WRITE") FileWrite(Output,"Type,Property Name,Value") ; Get mandatory properties of object. sList = dsGetPropName(sAdsiPath, MANDATORY) if sList != "" count=ItemCount(sList,@TAB) For x=1 to count item=ItemExtract(x,sList,@TAB) val=dsGetProperty(sAdsiPath, item) FileWrite(Output,"MANDATORY,%item%,%val%") Next endif ; Get optional properties of object. sList = dsGetPropName(sAdsiPath, OTIONAL) if sList != "" count=ItemCount(sList,@TAB) For x=1 to count item=ItemExtract(x,sList,@TAB) val=dsGetProperty(sAdsiPath, item) Data=StrCat("OPTIONAL",",",item,",",val) FileWrite(Output,Data) Next endif ; Get all properties of object. ;sList = dsGetPropName(sAdsiPath, MANANDOPT ) ;if sList != "" ; sList = strreplace(sList,@TAB, @CRLF) ; message("All Property names. ", sList) ; FileWrite(Output," ") ;FileWrite(Output," ") ;FileWrite(Output,"All Property names. ") ;FileWrite(Output,"--------------------------") ;FileWrite(Output,sList) ;endif FileClose(Output) Run("Excel.exe","C:\temp\out.csv")
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adschema/adschema/attributes_all.aspList of all Schema Attributes and info on each:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adschema/adschema/active_directory_schema.asp
Article ID: W15378
File Created: 2004:07:22:10:16:54
Last Updated: 2004:07:22:10:16:54