If your company has an HR database of some sort, you can build a nice little process to update the Active Directory user accounts automatically, whenever HR makes a change.  This can be done very easily using PowerShell or VBScript code available at your friendly neighborhood Internet, and a few teaspoons of WhoopAss.  The recipe is further down…

marie-wilson-cooking

Examples:

  1. New hires
  2. Terminations
  3. Name changes
  4. Sex changes
  5. Promotions
  6. Demotions
  7. Forklift Accidents (who knows?)

Ingredients

  • Caffeine
  • A Computer with a keyboard and a monitor
  • A Text Editor
  • Fingers (if you don’t have any, chop off someone else’s)
  • Sugary snacks
  • The DSN for the HR database (if they won’t give it to you, blackmail one of their staff)
  • Task Scheduler (comes with Windows. Batteries not included)
  • PowerShell code (Google or Bing for terms shown below)

Cooking

  1. Mix script code, DSN and Text Editor thoroughly with caffeine, sugar snacks and lots of smack talking.
  2. Pour into a 3 x 5 test environment, be sure to grease the pan first.
  3. Bake in the test lab oven at 24×7 degrees for a few days.
  4. Serve with a cup of coffee, an updated resume and your resignation letter, because now you can find a better paying job elsewhere.

Bonus Tips

  • Populate all the AD user account fields, like Department, Manager, and Job Title.  These can easily drive Visio organization chart wizards and make you look like a real application development sex god!
  • Whenever a coworker approaches your desk, be sure to smack keys extra loud and say things like “damn these microprocessor threads!”
  • Never drink cold coffee.  Cold coffee is for losers.  Winners drink coffee heated to precisely 4,000 degrees Fahrenheit and use welding gloves to grab the cup.

Helpful Search Terms

  • “powershell query database”
  • “powershell update AD user account”
  • “powershell task scheduler”
  • “vacation drinking naked”
  • “winning lottery numbers”

Enjoy!

Advertisements

One thought on “IT Automation Tip #1

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s