Jump to content

Recommended Posts

Posted

The following script will retrieve a logged on Users Full DN name from ADS as well as some other trivial info.

I need to be able to get a user's Full LDAP name in an AutoIt script.

Could somebody show me the AU3 Code to do this? Really only the first 2 lines are relevent for my purpose.

(Note: For a number of reasons I don't want to have the VBS script pipe the info back to AU3 and would prefer that AU3 handle the function.)

---------------------------------------------------------------------------------------------

Set oADsSysInfo = CreateObject("ADSystemInfo")

WScript.Echo "Distinguished name of the current user: " & oADsSysInfo.UserName

Wscript.Echo "Domain short name: " & oADsSysInfo.DomainShortName

Wscript.Echo "Domain DNS name: " & oADsSysInfo.DomainDNSName

Wscript.Echo "Forest DNS name: " & oADsSysInfo.ForestDNSName

Wscript.Echo "Domain is in native mode: " & oADsSysInfo.IsNativeMode

Wscript.Echo "Location (Site name) of the current computer: " & oADsSysInfo.SiteName

WScript.Echo "Distinguished name of the current computer: " & oADsSysInfo.ComputerName

Posted

Note: needs beta

dim $oADsSysInfo = ObjCreate("ADSystemInfo")
Msgbox(0,"",$oADsSysInfo.UserName)

Beta can be downloaded in the Developers forum in the sticky called "Latest Beta"

~cdkid

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...