Need some expert knowledge on Powershell with Active directory as mine is rather rookie.
Due to some very long winded circumstances i have 3 identifiers available pull the correct account from AD, enable it and reset the password automatically. (First Name, Surname and Created date.) Now we currently have a script in place which automates the enabling and resetting of password but we have to manually grab each individual username and copy/paste to the script… ball busting for 30+ staff p/w, i know.
If users have the same name the next available number is used. (If john.smith1 is in use, it will use john.smith2)
Can powershell differentiate the two by created dates? (Which 2 weeks would be fine)
Is it possible to do this or atleast in half?
So the 1st script will use the 3 identifiers and save username to text/excel sheet if need be
and the 2nd script use the usernames to do the rest?