Please don't boo: today
We are talking about the
User database.
This past weekend the author of today's Lync Server PowerShell haiku spent some time watching the Seattle Mariners play the Oakland Athletics.
Note . Why was he watching the Seattle Mariners? That's a good question, considering the fact that the Mariners have the worst record in baseball and are already 7 games behind the division-leading Texas Rangers. The best he can come up with is that watching the Mariners is like watching a car wreck: you really shouldn't look, and yet, for some reason, it's hard to turn away.
At any rate, while watching the game he once again noticed something that has driven him crazy for years now. Picture this: the Mariners get a man on base. The next batter comes up to the plate, the opposing pitcher peers in to get the sign from the catcher, and the runner on first leads off. The pitcher looks over at the runner and then, deciding that the runner is a little too far off first base, throws the ball over to first in attempt to get the runner out. (Or, as we baseball people like to say, tries to "pick him off.") All the fans at the game (both of them) immediately begin to boo at the top of their lungs. In fact, baseball fans always boo any time a pitcher tries to pick off a runner. And that's what drives the author of today's haiku crazy: why in the world are these people booing? Is it because the pitcher is doing something illegal? Of course not: baseball rules allow you to try and pick the runner off. Is it because the pitcher is trying to get the runner out? Well, maybe. But how much fun would baseball be if the other team didn't try to get you out? Baseball fans (and especially Seattle Mariners fans) routinely boo all pickoff plays, and the author of today's haiku is mystified as to why they routinely boo all pickoff plays.
Note . Although, in defense of Seattle fans, it's so rare that the Mariners actually get a runner on base the fans probably are so startled and so surprised that they really have no idea what to do. And when it comes to baseball fans, when in doubt, boo.
Of course, that put a little pressure on the author of today's haiku: he didn’t want to write a haiku that would result in everyone booing. (He already hears enough booing each morning as he walks down the hall towards his office.) Because of that, he decided to pick a topic that no one would dare boo: the CsUserDatabaseState cmdlets ( Get-CsUserDatabaseState and Set-CsUserDatabaseState ).
So how does he know that no one will boo him for writing about the CsUserDatabaseState cmdlets? Well, after all, what's there to boo? The Get-CsUserDatabaseState cmdlet lets you know whether or not your user database is online and available. (The user database, also known as the user store, maintains presence and routing information for Lync Server users.) To quickly retrieve the status of all your user databases, just run this command:
Get-CsUserDatabaseState
To check the status of all the user databases in a specified pool, just add the RegistrarPool parameter and the fully qualified domain name of that pool:
Get-CsUserDatabaseState –RegistrarPool atl-cs-001.litwareinc.com
Heck, you can even check the status of a single user database instance:
Get-CsUserDatabaseState –Identity "UserDatabase:atl-cs-002.litwareinc.com"
Not much to boo about, is there?
Likewise, the Set-CsUserDatabaseState cmdlet lets you (essentially) turn your user databases on or off. Suppose you need to take the user databases down in one of your pools. That's fine; all you have to do is run a command like this one:
Set-CsUserDatabaseState –RegistrarPool atl-cs-001.litwareinc.com –Online $False
And then what do you do when you need to bring that database back online? Why, you do this, of course:
Set-CsUserDatabaseState –RegistrarPool atl-cs-001.litwareinc.com –Online $True
In other words, set the Online parameter to $False to take a database offline, and then set the Online parameter to $True to bring the database back online.
Incidentally, Lync Server will still continue into chug along (albeit with some limited functionality) if you take the user database offline. For example, if you happen to be working in Microsoft Lync when the user database goes offline, you'll see a message similar to this:
A network or server issue is temporarily limiting features. Your Contacts list is unavailable but you can search for contacts and make calls. Call forwarding may not be working and delegates or team call group members may not be receiving your calls.
In turn, Lync might end up looking like this:
However, Lync will still work. Just like the error message noted, the user can search for contacts and send instant messages. It's just that certain features – like the Contacts list, phone call log, and Activity Feeds – are unavailable until the database is brought back online.
So see? The CsUserDatabaseState cmdlets: simple and sweet. And, best of all, they give you no reason to boo today's haiku.
Well, except for those of you who boo every day's haiku. But that's another story.