I'm slowly but surely perfecting a new user script. As it is, my script will do everything to add a new user to our domain, except one thing. We have an in-house program, webpage front end that connects to a SQL database. Typically I go to the webpage and open up a current user for reference, then add the new user with the same criteria (except name, email and username) as the current user. I was thinking it would be nice to add that into the script so that everything is in one location. And, I figured it would be easier to add the new user through the backend than through the webpage front-end (using PowerShell anyway). I don't actually have much SQL experience but I figured this would be a good time to learn some basic commands while learning PowerShell.
So in summation, I'd like the script to go to the SQL server, look for the user I tell it (I already have a variable for current user for something else), create a new user just like that user with the exception of his/her name/email address/login name. There are a handful of fields that would be the same; department, groups, etc.
Thanks for any pointers you can give!