Hello, is there a tool that will generate an alpha numeric string that can be used to create an AD account automatically?
For eg, I imagine setting up a task that will run the tool, output the string to a file and run another task that will create an account in AD using that string as the u/n and p/w.
Since you create the user yourself and give it a PW yourself, you know it ;-)
example: net USER test%random% P@ssw0rd /ADD /DOMAIN => password is P@ssw0rd for all users
net USER test%random% PW%random% /ADD /DOMAIN => password is PWnnnn where nnnn is NOT the same random number as the user. You have to verify the output from 'net use' to know the PW.
I tried this, specifying a username. The account was created with a random password. I don't know how to output the password to a file. Is it possible to autmatically email the password to the user?
>>how to output the password to a fileunfortunately the 'net use' command doesn't show it in his output.
You could make a script : set $USER=test%random% Set $PW=PW%random% echo Creating %$USER% with password %$PW% net USER test%$USER% PW%$PW% /ADD /DOMAIN
Save the above lines with CMD as extension and run it (elevated prompt on a DC !).
If you want the usernames and password logged in a file, add this echo %$USER%; %$PW% >> file.log
>> Is it possible to automatically email the password to the user? It is possible, but it will take some work. I always use blat.exe in my script to send a mail.
It says: ***Error*** The SMTP does not like sender name ***Error*** Have you set your mail address correctly.
When I ommit the -f switch blat is unable to the registry key. I think it wants me to use the -install switch but i would rather not. Is the -f switch for the computername from where you are running the blat?