Jump to content

Active Directory: Best way to validate user added is...?


Recommended Posts

#RequireAdmin

; Create all variables for DSADD command
$DomainName = @LogonDomain
$UserDN = '"CN=TCADMIN,DC=' & $DomainName & ',DC=COM"'
$SamID = 'TCADMIN'
$FN = 'TCADMIN'
$Display = 'TCADMIN'
$PWD = 'ImPoSsIbLeToGuEs1!'
$Memberof = '"CN=Domain Admins,CN=Users,DC=' & $DomainName & ',DC=COM"'
$DsaddUser = 'dsadd user ' & $UserDN & ' -samid ' & $SamID & ' -fn ' & $FN & ' -display ' & $Display & ' -pwd ' & $PWD & ' -memberof ' & $Memberof & ' -disabled no'

RunWait(@ComSpec & " /c " & $DsaddUser)

Allright folks,

Anyone has a good idea what I can use or how I can validate this Domain Admin I added was really successfully added?

I apreciate any suggestions.

Thanks,

- Pas

PS: (And don't tell me to go to administrative tools and look! this is an AutoIt forum for peets sake! :) )

Edited by GreenHouse
Link to comment
Share on other sites

I think there is a ldap UDF on the forums, i suggest you look into that.

Anb btw, script you are writing wont work on a standard Win2k machine since Win2k does not have any of the "ds" commands, as the standard setup.

UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.
Link to comment
Share on other sites

I think there is a ldap UDF on the forums, i suggest you look into that.

Anb btw, script you are writing wont work on a standard Win2k machine since Win2k does not have any of the "ds" commands, as the standard setup.

Jokke,

Thanks for the reply. Yes i know it's for use on Windows 2000 Server or Windows 2003 Server only for the script I am writing will only be ran on either two.

Thanks for your help I apreciate it.

- Pas

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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