Category Archives: PowerShell

Comparing PowerShell Switch Parameters with Boolean Parameters

If you’ve ever take a look at the help output (or TechNet documentation) for PowerShell cmdlets, you see that they list several pieces of information about each of the various parameters the cmdlet can use: The parameter name Whether it is a required or optional parameter The .NET variable type the parameter expects A description […]


A certificate roundup

Certificates are one of the biggest issues I keep hearing about with Exchange and OCS, and apparently I’m not the only one. Fellow MVP Michael B. Smith has recently posted two blog articles on certs: how to use SAN certificates with ISA 2006 and other certificate limitations. However, he’s got a couple of points on […]


Sweet PowerShell lovin’…for free!

And yes, that’s “free as in beer,” not “free as in what some people think all information wants to be.”[1] Frank Koch and Marcel Trümpy of Microsoft (in Switzerland) have created not one, but two Windows PowerShell ebooks, and you can get them both for free: A Windows PowerShell course book with associated demo files […]


Liveblogging the Unified Communications Voice Ignite conference, day 3

Good morning! Back for day 3. (You can see my day 2 notes here.) 09:13: Back when I first started doing OCS, the vision included “hybrid“ gateway devices which included the Mediation Server role functionality in the gateway. Well, they exist now — partners have been busy! (source 10:25: User provisioning can be fun. When […]


Post-Connections report

Vegas was great again, this year; the hotel was as lovely as ever, but the overlap with the Latin Grammys sure did some interesting things to the elevators. Mandalay Bay felt full this year! On the other hand, the beach remodel was excellent; the wave pool and the Lazy River pool were both hits with […]


It’s a release!

For those of you who have been waiting for that sweet, sweet DPM 2007 goodness…wait no more. It’s gone RTM. DPM 2007 is an amazing product, so amazing that somebody and his cow-orker are writing a book about it. (Yes, Ryan and I have been pretty busy on this thing; in fact, I get to […]


Testing your new Exchange 2007 Send connector

Updated 1401 PDT: added the diagram. A recent post on a mailing list I frequent gives me today’s blog post. So you’ve got an Exchange 2000/2003 organization and you’ve decided that you want to upgrade to Exchange 2007. You’ve done all the research and planning and you’ve gotten as far as installing the first HT […]


Using PowerShell to admin Exchange 2000/2003

Via Evan’s blog, I found out about this pair of postings on using PowerShell’s WMI provider to manage Exchange 2000/2003 servers. I’m still working up my notes on my Exhange Connections session on this topic; once I get past the first draft deadline for the DPM book later this week, I should have spare time […]


Bouncing email to Exchange 2007 distribution groups

A few days ago, I was asked to track down what was, on the surface, a troubling problem with Exchange 2003: bounced messages to addresses I knew for a fact existed in the organization. They were both generating a 5.1.1 User unknown SMTP error. As you can imagine, we have several distribution and security groups […]


Post-Connections post

Another Exchange Connections event has come and gone. As nice as the venues are, I really wish the spring Connections events weren’t in Orlando — the town itself is spread out, limiting how easy it is to get out of the event venue for a couple of hours and go do anything on your down […]


Need some PowerShell help

Normally, when I write a blog post, I’m trying to help other people out. I forget that it can work both ways. So, today’s post is a plea for help: if you know a lot about PowerShell, I could use an answer to the following three questions. If you’ve got any insights, please drop me […]


Getting to know the legacy Routing Group Connector in Exchange 2007

If you install Exchange 2007 into a legacy Exchange organization (by legacy, I mean Exchange 2000/2003), the first time you install the Hub Transport (HT) role into the organization you are asked to designate one of the legacy Exchange servers as a LegacyRoutingServer. You may already know that Exchange uses this server, along with your […]


Gaps in PowerShell cmdlet coverage

As I’ve been working more and more with PowerShell, I’ve discovered a few gaps in coverage in the cmdlets it offers. Most of my PowerShell noodling has been with Exchange 2007, so represents holes in the Exchange Management Shell extensions, but the one I just ran across is basic PowerShell. PowerShell provides a series of […]


Managing public folders in Exchange 2007

In general, I love Exchange 2007. I love Exchange 2007 with a love that is brighter than the aggregate IQ of a science fiction convention and stronger than the body odor of the RPG section of that same convention[1]. However, one area of Exchange 2007 that I don’t love is public folder management. It is […]


Using PowerShell to sort mailboxes by size

This weekend I was playing with the Exchange Management Shell while performing some troubleshooting on our Exchange 2007 system and discovered some fun combinations of cmdlets I thought I’d share. First, let’s start with a command that lists all of the mailboxes in a given server, sorted by size. There are two variants for ascending […]


Using PowerShell to find the average size in a group of files

Today I wanted to find out the average size of a group of files. To make it more challenging, I wanted to find the average size of a group of files that existed co-mingled in a directory with several other files I didn’t care about. PowerShell to the rescue! In my examples, we’ll say I […]



Microsoft’s Evan Dodds has a post on why you need to use the tokens $true and $false in PowerShell scripts instead of the strings “true” and “false”.


Another PowerShell one-liner

Today I needed to evenly split 40,000 files between 5 directories. The math is simple — 8,000 files in each directory — but the way I’d have normally handled a one-off task like this is by using Windows Explorer to go in, manually select the first 8,000 files, drag them into the first target directory, […]


Bulk creating Exchange mailboxes from a CSV file

The current project I’m working on required me to create a large number of mailbox-enabled user accounts in an Exchange 2007 organization. When you’re using Exchange 2007, you need to provision your accounts with Exchange 2007′s tools, and the Exchange Management Shell (EMS) makes creating mailboxes quick and easy. Here’s the script I used:



Database and disk spindle management in Exchange 2007

When you’re optimizing Exchange 2003/2000 servers for performance, one of the first places you look is at your disk configuration. As a rule of thumb, you want to get as many of the following components as possible reading and writing to separate sets of disk spindles (thus reducing contention): The operating system The Exchange binaries […]


Which version of Powershell do I need for Exchange 2007?

I was working up a post on this very topic when I noticed that Paul beat me to it. No need for me to repeat it…go read him! (And tell him I sent you!)


A nifty PowerShell example

Let us say you have a directory full of files written to it over a period of time, and you need to quickly move all of the files written on a given day (any time during that day) to a different folder. This is something that is difficult to do using just the standard DOS […]


What’s in a name?

Microsoft has made two big product name announcements in the last couple of days: Monad (formerly the Microsoft Shell or Management Shell) has been renamed to Windows PowerShell. I, personally, am disappointed; Monad is a great name (grade-school sound substitutions aside) and had a decently geeky pedigree to interest folks who aren’t normally willing to […]