And now a word from our sponsor…

Recently Microsoft's legal department asked me to remind you that, yes, I do work for Microsoft.  (I'm sure you already figured that out since this is a TechNet blog, and I have the Microsoft Employee label on my profile.)  As such we have many disclaimers that you should be aware of when referencing content from this blog or using scripts posted on this blog.  I have always listed this disclaimer on my About page, but here it is again for your reading enjoyment:

# --- Begin Reading Enjoyment ---

This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify the Sample Code and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or trademarks to market Your software product in which the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product in which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims or lawsuits, including attorneys' fees, that arise or result from the use or distribution of the Sample Code.

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at

# --- End Reading Enjoyment ---

We all know what this means.  If you use a script from this blog and it hoses your entire production network, then… um… well… you are the one that ran the script.  You should always read a script, understand what it is doing, and test it in your lab prior to unleashing it on your prized production neighborhood.  I try to write good code, but you be the judge.  Always test first.

Also, contrary to popular belief, the employees of Microsoft are indeed human, not borg.  It is entirely possible that I may unintentionally make an incorrect statement and/or infuse fact with opinion which you may interpret as an official statement of the greater company Microsoft.  Don't do that.  Any statements I make are generally based on my knowledge and experience and should not (in most cases) be viewed as an official company statement.  TechNet is full of official company statements around our products, and I'll link to those as often as I can.

My passion is for PowerShell and Active Directory.  I enjoy sharing that with you here on this blog.

And now back to our regularly scheduled PowerShell programming…