Haiku #120

Haiku #120

  • Comments 2
  • Likes

Do not be afraid:

We do have a backup plan.

User pool info.

 

If you can hear an echo while reading today's haiku, there's a good reason for that: at the moment, the author of today's haiku is working in a building that appears to be completely empty. On top of that, there was absolutely no traffic whatsoever when he came in this morning. Usually it takes him right around 25 minutes to get to work, sometimes a little more, hardly ever a little less. Today he made it to work in 19 minutes. A new world's record!

 

So where is everyone today? Well, tomorrow is the start of the three-day Memorial Day weekend; maybe this year Memorial Day got changed to  a four-day weekend and no one bothered to tell the author of today's haiku. And yes, he did consider the possibility that The Rapture actually had occurred, and that the just and the righteous had all been called up to heaven. That would explain why there was so little traffic this morning. But what would the just and the righteous being called up to heaven have to do with people who work at Microsoft?!?

 

Note. Just kidding, people who work at Microsoft.

 

At any rate, the author of today's haiku seems to be the only person in the building right now, which is truly a dream come to: it's like when you were a kid, and you fantasized about being locked up in a toy store overnight.

 

Speaking of which, suppose you were a kid and you did get locked up in a toy store overnight. What's the first thing you would do?

 

Hey, cool: we said "Run the Get-CsUserPoolInfo cmdlet," too! But, then again, that was kind of a silly question: what kid (or adult, for that matter) wouldn't want to spend their time running the Get-CsUserPoolInfo cmdlet? As you probably know, the Get-CsUserPoolInfo cmdlet returns information about the Registrar pool, backup registrar pool, and User Service's pool that a user has been assigned to. For example, suppose you'd like to retrieve that information for Ken Myer's user account. All you need to do is run a command like this one:

 

Get-CsUserPoolInfo –Identity "Ken Myer"

 

In turn, Get-CsUserPoolInfo will retrieve information similar to this:

 

PrimaryPoolFqdn                     : atl-cs-001.litwareinc.com

BackupPoolFqdn                      : red-cs-001.litwareinc.com

UserServicesPoolFqdn                : atl-cs-001.litwareinc.com

PrimaryPoolMachinesInPreferredOrder : {Atlanta:1-1}

BackupPoolMachinesInPreferredOrder  : {Redmond:1-1}

 

Pretty easy, huh? As you can see, Ken Myer has an account in a Registrar pool that has been assigned a backup pool; that means Ken will still be able to log on, and still be able to use Lync Server, even if his primary pool (atl-cs-001.litwareinc.com) goes offline, takes a four-day weekend, or gets called up into heaven. If Ken's Registrar pool hadn't been assigned a backup pool then Get-CsUserPoolInfo would let us know that:

 

PrimaryPoolFqdn                     : atl-cs-001.litwareinc.com

BackupPoolFqdn                      :

UserServicesPoolFqdn                : atl-cs-001.litwareinc.com

PrimaryPoolMachinesInPreferredOrder : {Atlanta:1-1}

BackupPoolMachinesInPreferredOrder  :

 

Speaking of which, suppose you'd like a list of users who are homed on a pool that doesn't have a backup. How can you determine that? Why, by running a command like this one, of course:

 

Get-CsUser | Get-CsUserPoolInfo | Where-Object {$_.BackupPoolFqdn –eq $Null} | Select-Object DisplayName

 

What have we done here? Well, here we've first used Get-CsUser to return a collection of all the users who have been enabled for Lync Server. We pipe that information to Get-CsUserPoolInfo in order to retrieve pool data for all those users, then pipe the pool data to the Where-Object cmdlet. In turn, Where-Object extracts only those users where the BackupPoolFqdn property is equal to a null value. And then, finally, we use Select-Object to report back just the display name of those users. Whew!

 

Note. Yes, as a matter of fact we did figure that out all by ourselves. We had to: there's no one else here today.

 

Here's an interesting command. Suppose you need to temporarily take a pool down for some reason. You'd like to know which users might be affected by that pool; that means users who might use that pool as their primary pool as well as users who might use that pool as their backup pool. How can you get a list of those user accounts? Like this:

 

Get-CsUser | Get-CsUserPoolInfo | Where-Object {$_.PrimaryPoolFqdn –eq "atl-cs-001.litwareinc.com" –or $_.BackupPoolFqdn –eq "atl-cs-001.litwareinc.com"} | Select-Object DisplayName

 

What we've done here is use Where-Object to look for users who meet 1 of 2 criteria: either they have a PrimaryPoolFqdn equal to atl-cs-001.litwareinc.com or they have a BackupPoolFqdn equal to atl-cs-001.litwareinc.com. And that's pretty cool.

 

Note. If you didn't care about the backup pool, you can also get a list of the users homed on atl-cs-001.litwareinc.com by using this command:

 

Get-CsUser –Filter {RegistrarPool –eq "atl-cs-001.litwareinc.com"} | Select-Object DisplayName

 

Ah, good question: what is the deal with the pool machines and backup machines properties? As we saw a few minutes ago, the set of computers in a pool gets displayed like this:

 

PrimaryPoolMachinesInPreferredOrder : {Atlanta:1-1}

 

So is Atlanta:1-1 some weird kind of computer name?

 

No. Instead, it's just a somewhat arbitrary computer identity. In this case, Atlanta is the site name, the first 1 means the first pool created within that site, and the second 1 means the first computer created in that pool. Is that useful information? Not really: you won't find many occasions when you'll be able to refer to a computer as Atlanta:1-1. Fortunately, though, you can get some useful (and meaningful information) by running a command like this one:

 

Get-CsUserPoolInfo –Identity "Ken Myer" | Select-Object –ExpandProperty PrimaryPoolMachinesInPreferredOrder

 

When we "expand" the values stored in the PrimaryPoolMachinesInPreferredOrder property we get back information similar to this for each computer:

 

MachineID         : Atlanta:1-1

Cluster           : Atlanta:1

Fqdn              : atl-cs-001.litwareinc.com

PrimaryMacAddress : 000000

Topology          : Microsoft.Rtc.Management.Deploy.Internal.DefaultTopology

 

As you can see, one of the properties that gets returned here is the Fqdn property: the fully qualified domain name of the computer. That is useful information.

 

Note. And if you really are locked up in a toy store, and thus have a bunch of time to kill, you could run this command and get all sorts of information about your Lync Server topology:

 

Get-CsUserPoolInfo –Identity "Ken Myer" | Select-Object –ExpandProperty PrimaryPoolMachinesInPreferredOrder | Select-Object –ExpandProperty Topology

 

Or you could just try to build something cool out of Legos. That's up to you.

 

That's about all there is to the Get-CsUserPoolInfo cmdlet. As for us, we're going to take advantage of the fact that no one else is here and do something we've always wanted to do at work: kick back, put our feet up on the desk, and do nothing whatsoever. How is that different from what we usually do at work anyway? Actually, it's not different at all. We just felt like kicking back, putting our feet up on our desk, and doing nothing whatsoever.

 

See you all next Tuesday.

 

 

 

Comments
  • Can you please provide an example where the output would only contain a list of users that are homed on a specific server in a specific pool? That way if I decide to take only a single server in the pool down for maintenance I know which users (and how many) will disconnect/reconnect to another server in the pool before I do it.

  • Hey Henry, We can give you an example of getting the users on a pool, but unfortunately there is no PowerShell cmdlet that will allow you to discover which server in a pool they're on.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment