Automating AD processes

Finally – forgive me everybody, it has been to long since my last post.

Every System Administrator has to deal with Active Directory (most Windows Administrators at least), so automating repeating processes can be very useful.

I recommend using functions with parameters to generalize the function and can be shared among administrators, even though AD structure is can be different.

Wandering off – talking about function, best practices is to use a Verb-Noun (like Get-ADUser) and never in plural, always single.

Getting on point here again.

First of all, creating users from csv, very useful when dealing with multiple user creation.

Create a CSV file including all the AD attributes you want to include in the user creation, I’m going with simple ones and save it in a location like C:\Temp

"FirstName","LastName","UserName","EmailAddress"
"Hallgrimur","Test","hallgrimur.test","hallgrimur@test.com"
"Finn","AnotherTest","finn.test","finn@test.com"

(more…)