Haiku #21
Happy New Year! Which
Means we need a new haiku:
CsDirector.
Good news everyone: after an extended holiday absence the Lync Server PowerShell Haiku of the Day is back in business! We're looking forward to a fun-filled year of – hey, wait a second: who said "You're back? We didn't even know you were gone!" That hurts, guys; it really does.
Note. In case you're wondering, the author of today's haiku spent part of his vacation in the great city of Las Vegas, NV, where you can have girls! girls! girls! delivered directly to your door in less than 20 minutes! (While he did not order one, he's pretty sure that those girls! girls! girls! cost money! money! money!) How did the author fare in the Vegas casinos? Let's put it this way: he's writing another Lync Server haiku, isn't he?
To celebrate our return, we thought we'd start the new year off with a very exciting and thrilling haiku; however, when we couldn’t come up with one, we decided to just throw something together that made a vague reference to the Set-CsDirector cmdlet. But listen, don't let the lameness of today's haiku detract from the usefulness of the Set-CsDirector cmdlet. If you need to modify the properties of one or more of your Lync Server Directors, well, Set-CsDirector is definitely the way to go.
If you're new to the Lync Server world, a Director is used to authenticate user logons and to respond to user requests for service. And yes, that does sound a lot like what a Front End server does, doesn’t it? However, there is a major difference between Directors and Front End servers: Directors do not host user accounts. Instead, they're typically used to handle logons and service requests from external users (that is, users connecting to the system from outside the internal network). This provides two advantages: 1) it alleviates some of the stress and strain that would otherwise be placed on the Front End servers; and, 2) it helps shield the internal network from denial-of-service attacks and other malicious activities. Oh: and Directors also come in handy if you have multiple Front End servers deployed in a site. In that case, they can do a little on-the-fly load-balancing, gathering up user requests and then funneling those requests to the appropriate Front End pool.
In other words, yes, Directors do deserve a better haiku than the one we gave them. But such is life.
As for Set-CsDirector, that cmdlet enables you to do such things as change the Edge server or the Archiving server associated with a Director; you can also use Set-CsDirector to modify the ports used for SIP traffic and/or Web services traffic. For example, suppose you wanted to change the SIP port used by the Director atl-cs-001.litwareinc.com. That requires one little command, a command similar to this:
Set-CsDirector –Identity atl-cs-001.litwareinc.com –SipPort 5072
Pretty simple, huh? Set-CsDirector: Lync Server updates delivered to your door in less than 20 minutes!
If you're sitting at your desk thinking "That is pretty simple. But I wonder if there's anything quirky about Set-CsDirector that I should know about," well, we can think of one thing: there's no corresponding Get-CsDirector cmdlet. That doesn't mean that you can't retrieve information about your Directors; it just means that, like many of the Lync Server services and server roles, you need to use the Get-CsService cmdlet to get at that data. For example, this command returns information about the Director atl-cs-001.litwareinc.com:
Get-CsService –Director atl-cs-001.litwareinc.com
And this command returns information about all your Directors:
Get-CsService -Director
Quirky, but it works.
Oh, and that also means that, if you want to perform the same operation on all your Directors, then you'll need to use a command similar to this one:
Get-CsService -Director | ForEach-Object {Set-CsDirector -Identity $_.Identity -SipPort 5072}
In this command, we first use the Get-CsService cmdlet to return a collection of all the Directors currently in use in our organization; we then pipe that collection to the ForEach-Object cmdlet. Why do we pipe that data to ForEach-Object rather than to Set-CsDirector? That's an easy one: the Set-CsDirector cmdlet doesn't accept pipelined data. Because of that, we need to rely on ForEach-Object, which will loop through each Director in the collection and, in this example, set the SIP port to 5072.
So, OK, maybe there are two quirky things you need to know about Set-CsDirector. But as far as we know, that's pretty much it for Set-CsDirector quirks.
As for the Lync Server PowerShell Haiku of the Day, well, we'll be back again tomorrow, unless we can figure out a way to take another extended holiday break. As it turns out, January 11th is the feast day for St. Theodosius the Cenobiarch. Is that an official holiday here at Microsoft? Tune in tomorrow to find out.
Historical note. According to legend, St. Theodosius the Cenobiarch lived in a cave and spent his entire day praying. And when we say he spent the entire day praying, we mean it: he even suspended a rope from the ceiling in order to prop himself up should he fall asleep. That way, he could stand and pray all night long. Coincidentally, we use a similar rope to tie Jean Ross to her computer, just in case she falls asleep while posting the daily haiku.