ISO CA US UK - the PowerShell Active Directory Country Gotcha

by Ed Sparks

While writing some PowerShell scripts to update a few Active Directory fields en-masse, we discovered a distinct lack of documentation on updating address information; particularly the country field.

While it appears these fields would be free-form text (as they are when editing through AD GUI tools), through PowerShell they are actually normalized and must be in the ISO Country Code format!

So, using "Canada" as a country will not work.  Rather you must use CA.  Which isn't California.

Failing to use one of the ISO codes will result in PowerShell throwing invalid errors when it writes the AD object.

Here is a list of the ISO country codes.
 

Here is a good Technet script for copying AD properties, as well.

Great New Free Utilities from Microsoft

by Ed Sparks

Microsoft has a number of great new utilities designed to make administration easier, especially in the Exchange space. 


Exchange Client Network Bandwidth Calculator (link)Helps reduce the risks involved in Exchange Server network bandwidth planning. The Exchange Client Network Bandwidth Calculator has been designed to help anyone planning an Exchange Server deployment to predict the network bandwidth requirements for a specific set of clients. The prediction algorithms used within this calculator are entirely new and have been derived after significant testing and observation. Read More