Haiku #81

Who are you and what

Services are you running?

Tell me, CS Pool.

If you've been following the news over the past few days, you might have heard reports that one legendary Microsoft employee has written a book that takes a few digs at another legendary Microsoft employee. We wanted to take a moment today to inform you that these reports are in error: Jean Ross has not written a book that takes a few digs at her fellow Lync Server PowerShell blog author.

At least not yet, anyway.

Of course, that leads to another question: should Jean Ross write a tell-all book about her fellow Lync Server PowerShell blog author? Well, that fellow, and the author of today's haiku, must confess to having one serious flaw: up until now, he's hasn't written a single Lync Server PowerShell haiku about the Get-CsPool cmdlet. Thanks to today's haiku, however, that's no longer a problem, which means that he no longer has any flaws whatsoever.

Which, in turn, means no need for that tell-all book after all.

Note from Jean. True, there’s now no need to talk about the time he didn’t show up for the first day of TechEd, leaving Jean alone at a booth mobbed with people. Or the time he cancelled a week-long series of webcasts and ran off to Europe. Or the time he thought it would be a good idea to start a weekly Lync PowerShell Challenge….

So what about the Get-CsPool cmdlet? Well, as the name implies, Get-CsPool returns information about your Lync Server pools. That sounds simple enough, but there's a bit of a catch there. People often talk about "Lync Server Registrar pools"; as a result, they expect that running a command like this one will return information about all their Registrar pools:

Get-CsPool

Actually, that command will return information about all of your Registrar pools; however, it will also return a whole bunch of other information as well. Why is that? Well, as it turns out, in Microsoft Lync Server 2010 the term "pool" refers to one or more computers in the same site that are running the same set of services. For example, suppose you have one server in the Redmond site that's running the Mediation Server service. In that case, you're going to have a Mediation Server pool consisting of that one computer. (Yes, a pool can contain just one computer.) What if you have two computers in the Redmond site running Mediation Server? Then you'll have a Mediation Server pool consisting of two computers. The number of pools used in your organization will depend on the number of servers you have and the different services run by those servers.

Is that confusing? Maybe. However, you can still use Get-CsPool to return more finely-targeted information, like information about just your Registrar pools. The trick to doing that is to pipe the data to the Where-Object cmdlet, and ask Where-Object to pick out the information of interest. For example, here's how you can locate the pools that are running the Registrar service:

Get-CsPool | Where-Object {$_.Services –match "Registrar:"}

What about pools running either the Monitoring Server or the Archiving Server service? No problem:

Get-CsPool | Where-Object {$_.Services –match "MonitoringServer:" –or $_.Services –match "ArchivingServer:"}

If you just want information about the pools running in a particular site, just add the –Site parameter followed by the site name. For example, this command retrieves information about the registrar pools in the Redmond site:

Get-CsPool –Site "Redmond" | Where-Object {$_.Services –match "Registrar:"}

And here's a command that might come in handy: it lets you know which pool a particular computer is in, as well as which services are running in that pool (and, by extension, running on that computer):

Get-CsPool | Where-Object {$_.Computers –contains "atl-cs-001.litwareinc.com"}

Note. If you just want to know the pool that a computer belongs to, and don't care about the services running in that pool, you can run this command instead:

Get-CsComputer –Identity "atl-cs-001.litwareinc.com"

We should probably add that there are no cmdlets for creating pools, deleting pools, or for modifying the properties of a pool. Those tasks can only be carried out using Topology Builder.

And there you have it: the inside story of the Get-CsPool cmdlet. Is that story exciting enough to merit a book about how the author of today's haiku managed to track down and report this information? Well, it sounds pretty exciting to us, at least. We'll pass this suggestion on to Jean Ross (and, while we're at it, John Grisham and Tom Clancy) and see what they think.