powershell

Exchange 2007 Move-Mailbox Report

As we migrate our mailboxes over from Exchange 2003, to Exchange 2007, we've been asked numerous times for reports detailing the time/size of each mailbox moved. Lucky for us, Exchange does a wonderful job documenting the move (when you use move-mailbox to do so). Unfortunately for most humans, this data is in XML format. Readable, just not user friendly.

Hence, I created this nifty script, to read the XML files, then export a summary (in HTML and CSV format) of the moves. To get it running in your environment, you'll need to:

Exchange 2007 Email Address Policy - distribution lists & mailboxes

We are set to finish our migration of several email domains over to our Exchange 2007 environment. One of the last issues to migrate across is the Exchange 2003 Recipient Update Policies, into the Exchange 2007 Email Address Policies.

Our current e2k3 RUP is a fine-tuned LDAP query:

(mailnickname=*)
(|(extensionattribute3=EXAMPLE*)(department=EXAMPLE*))
(|(objectCategory=group)(&(objectCategory=person)(objectClass=user)))

Delete Contacts NOT found in CSV

We have been working to synchronize our GAL through non-technical means with another remote company. We don't actively have a connection to this other environment so sneaker-net is the solution.

I currently get a CSV from this company with the following columns.

  • Mode (A for Add, D for Delete, C for Change)
  • FirstName
  • LastName
  • DisplayName
  • EmailAddress

Get Summary of Outlook Versions connecting to Exchange 2007

Asked for a query to get a summary of the Outlook Clients that are connecting to our Exchange server. The following Code will run against all mailboxes in a specific OU, but removing the filter will get all mailboxes on an Exchange server.

Your final results will include a count of the client versions in your environment. As you can see, each of our CIO dept has a Blackberry device (hence 2 MAPI Outlook client versions) and is running Outlook 2003 SP3 (Google 11.0.8161).

For example:
Count Name
----- ----

Grab my WoW Character into Powershell (aka case study in pulling data from xml)

I've always believed the best way to learn scripting is to build a script that you immediately have a need want for. For example, I was reading through one of my Warlock forums for World of Warcraft on a flowchart describing gem selection for gear. OMG, That's great, but well, I want to change it, I want to automate it.

My Big Fat Conference Room Conversion Script for Exchange 2007

In Exchange 2007, they have finally done resources correct. Using Powershell, you can define a mailbox specifically as a conference room, laptop, projector or other resource. As a resource it will appear differently in Outlook 2007 and OWA. These resources can be defined to automagically accept meeting requests using specific permissions on these resources. No longer will you need to use the flaky AAA as in Exchange 2003.

The attached script is my very detailed, all-in-one convert a standard/migrated mailbox to a conference room resource in Exchange 2007.

Oddity in Powershell operators

Here's the problem. To simplify a complex script, I have built a small menu.

  1. Quit
  2. User1
  3. User2
  4. ...

The list of users is dynamic (up to a maximum) defined as $counter. This dynamic list is composed of names from previous runs of the script (via being dotsourced). In addition to these users, I let the client type in names not defined in the subset, sort of a "Other" field.

PS PS:\> $counter
10
PS PS:\> $answer
8
PS PS:\> $answer -lt $counter
False

Why?? Why oh Why? Here's what I found..

PoSh Class Notes

My employer has provided to my team free powershell training to anyone who wanted it. Though I have been doing powershell scripts for over a year now, there were a few elements I had not learned through my self study.

1) When typing in properties to a cmdlet, you only need to type enough of the property to distinguish it from other properties.

get-mailbox -identity eric.woodford -organizationalunit "MyUsers OU"

Can be shortened to:

mailbox eric.woodford -org "MyUsers OU"

Where:

  • Mailbox is an alias for "get-mailbox"

Read WoWArmory XML via PowerShell

Due to technical issues, I haven't posted here in several months. Now the server has been stable for almost a month, I have to work to get back into the routine of doing so.

Blizzard Entertainment, the makers of World of Warcraft, maintain an 'armory' site. This site allows players like myself to review their characters gear, stats and various achievements. The entire site is a XML dump formatted with a XSLT style sheet.

Exchange Cleanup - Mixed up mailbox limits

We are on the verge of migrating 20,000 mailboxes from our older Exchange 2003 envivornment over to Exchange 2007. Some of these mailboxes have been around many years on 03, and before. This has created a number of mailboxes that have over time have very mixed up storage limits, usually a decimal place off. For example:

100 mb Warning Limit
10 mb Send/Receive Limit

Because of this, running any Powershell script against our 03 environment, we get tons of warnings. This script is the byproduct of that clean-up.