Let sleeping cats lie.

Instead, make changes using

CS Registrar.

 

Why yes, as a matter of fact, the author of today's haiku is a bit tired this morning. Thank you for asking.

 

Coincidentally, the author of today's haiku and his wife are babysitting a cat for the next three weeks. How hard could it be to take care of a cat? Well, it's not hard at all to take care of a cat. But taking care of this cat is a different story.

 

Not that we're dealing with a bad cat here; on the contrary, this cat seems pretty nice, and even sort of likes people. (Although we had to promise not to tell other cats that.) However, she does have … interesting … sleeping habits. For example, Monday morning she woke up at 4:00, which would be fine except that she enthusiastically tried to get everyone else in the house to get up and join her in whatever cats and people do at 4:00 AM on a Monday.

 

Note. Whatever it is, it's not fun. Nothing is fun at 4:00 AM on a Monday.

 

Last night the author of today's haiku was doing a little in-bed reading when the cat hopped on the bed and nestled up against him. Sweet, huh? Except that the cat went to sleep and refused to move. That might have been fine, except that it was a little stuffy in the room last night, and the author of today's haiku began roasting under the combined warmth of the bed covers and the cat. He couldn't peel back some of those covers, because he had a sleeping cat on one side and a sleeping wife on the other side. Eventually he managed to wriggle his way outside the covers, which bought him about 15 minutes of relief until he then started to get a little cold. And then – well, you get the idea. The whole thing continued on its merry way until the cat got up around 4:30 AM (slept in today!), which gave the author of today's haiku the chance to get back into bed, with the right amount of covers, and then try to cram an entire night's sleep into an hour and a half.

 

It didn't work.

 

At any rate, the point of all that is just to point out that if today's haiku seems a little disjointed and doesn't make a lot of sense, well, there's a good reason for that: the author of today's haiku is a bit tired this morning.

 

Note. And why don't any of the other haikus make a lot of sense? Hmmm ….

 

Fortunately, we found a sure-fire way to get the blood flowing again no matter how tired you might be: just start playing around with the Set-CsRegistrar cmdlet. As you might expect, Set-CsRegistrar provides a way for you to configure and manage your Registrars. As you might also expect, this includes doing such exciting things as configuring the ports used for Web service or SIP traffic. For example:

 

Set-CsRegistrar –Identity "Registrar:atl-cs-001.litwareinc.com" -SipPort 5072

 

That does get the heart pounding a little bit, doesn't it? What we thought we'd focus on today, however, is something that might be even more exciting than SIP ports: failover and failback.

 

Did we say "failover and failback?" You bet we did. Microsoft Lync Server 2010 provides a way for users to automatically be redirected to a backup Registrar any time their primary Registrar is unavailable. What does that mean? Well, suppose you're homed on atl-cs-001.litwareinc.com. You try to log on to Microsoft Lync, but atl-cs-001.litwareinc.com is unavailable for some reason. If you've configured a backup registrar for that pool (for example, atl-backup-001.litwareinc.com) then you have nothing to worry about: you'll automatically be redirected to, and be able to log on to, that backup registrar.

 

Note. With a few limitations. When you're logged on to a backup Registrar there are a few features – voice mail, and the ability to modify your call forwarding settings are two that come to mind – won't be available to you.

 

Excited? We thought you would be. To allow for this automatic failover, you need to do two things: enable failover in the first place, and specify a backup registrar. How do you that? That's right: you use the Set-CsRegistrar cmdlet. In other words:

 

Set-CsRegistrar -Identity "Registrar:atl-cs-001.litwareinc.com" -BackupRegistrar "Registrar:atl-backup-001.litwareinc.com" -EnableAutomaticFailover $True

 

And while you're at it, there are two other properties you might find useful. The first – FailoverDetectionInterval – specifies how long the system will wait before deciding that a Registrar is not available. (Lync Server periodically sends "heartbeat" messages to its Registrars to verify that they're still up and running.) If the detection interval has passed and a Registrar still has not responded to the heartbeat message, then the system will "failover," which simply means that Lync Server will begin directing users to the backup Registrar.

 

The other property of interest is FailbackDetectionInterval. Let's suppose a Registrar is unavailable, and you've been "failed over" to the backup Registrar. That works but, as we noted, there are some limitations: the complete Lync Server feature set is not available to you when you're working on a backup Registrar. Because of that, the ideal situation is for you to move off the backup Registrar as soon as the primary Registrar is back in business. The FailbackDetectionInterval property specified the amount of time Lync Server waits before checking to see if the primary Registrar is available. If it is, then users homed on that Registrar will see their sessions "failed back;" that simply means that users on the backup Registrar will be re-registered on their home Registrar.

 

Which is actually pretty cool.

 

Two quick notes about Set-CsRegistrar. First, there is no corresponding Get-CsRegistrar cmdlet. Does that mean that you can't retrieve information about how your Registrars are currently configured? No. It just means that you have to use the Get-CsService cmdlet instead:

 

Get-CsService –Registrar

 

Second, the Set-CsRegistrar cmdlet doesn't accept pipelined input; that means you can't run a command like this one and configure all your Registrars at the same time:

 

Get-CsService -Registrar | Set-CsRegistrar -SipPort 5072

 

But now that you mention it, there is a way to work around that: instead of directly piping the Registrar data to Set-CsRegistrar, pipe it to the ForEach-Object cmdlet instead:

 

Get-CsService -Registrar | ForEach-Object {Set-CsRegistrar -Identity $_.Identity -SipPort 5072}

 

Give that a try and see what happens.

 

As for the cat sitting, well, we'll see what happens. As it turns out, cats (who typically sleep as many as 16 hours a day) are "crepuscular," which means that they are most active at dawn and at dusk. Is "crepuscular" what the author of today's haiku called "his" cat at 4:00 in the morning? Uh, sure, yeah …. Crepuscular ….