This is a place for Systems Administrators and IT Professionals to find and share ideas, solutions and templates. If you have something that helps you solve a problem, chances are it will help someone else too. So pay it forward and send an email to TheAgreeableCow at gmail. Full mudos to you!

Thursday 24 May 2012

New User Creation Script

This powershell script is very handy for setting up new users in AD, Exchange and Lync.

It's customised to my environment and has saved us a ton of time. I'm sure many will have different requirements, so add, pull out and modify the bits you need.

If you're running RSAT from Windows 7, ensure to load the Active Directory module for Windows Powershell and have appropriate credentials.

The CSV file needs to be created up front with the at least the appropriate header info. As the script runs, it will open the CSV file to add/modify the user(s) details. I get our HR department to provide all of the required info in a table format, so a quick copy/paste/save is all that is needed. Also ensure to use samAccount names in the user lookup fields (manager etc).

Here is a summary of what it does:
  • Imports new user(s) info from a csv file
  • Creates new user account and mailbox in Exchange
  • Enables for Unified Messaging
  • Add mailbox access to thier manager's mailbox
  • Populates all AD fields
  • Adds to security/distribution groups (uses another similar user to copy memberships from)
  • Creates user profile and home directories, with permissions and ownership
  • Adds user to Lync, and setups features such as enterprise voice, policies etc
  • Creates a summary report and a log file and emails it to admin, HR etc


         (oo)  ok
   /------\/  /
  / |    ||
 *  /\---/\
    ^^   ^^

No comments:

Post a Comment