• Haiku #121

    The name says it all:

    Set Mediation Server.

    Sheer poetry, eh?

     

    OK, we concede: we have met our match. Up to this point we assumed that the Lync Server PowerShell Haiku of the Day represented the finest poetry being written anywhere in the world. But then we received the following email in our Junk Mail folder:

     

    you probably don't     remember me

       but i saw your picture on facebook

    we have never  met but I sawyour

    picture on facbook

                             do you rememember all the good times we had

    we can have those go

    od times again

             please click the link below

    sorry but I     don't have a face

    book account so   click the link below

       i cannot wait to see you again

     

    That's exactly how the email looked, including the clever use of line breaks, the design-inspired extraneous white spaces, and the creative spelling. (And no uppercase letters or punctuation: that's how you know you're dealing with good poetry.) And then there are the deeply-profound questions that were raised: Rememember all the good times we had, even though we have never met? I saw your picture on facebook even though I don't have a face book account?

     

    Needless to say, when you read that email your first thought is, "I must be missing something here; this must have been written by an artistic genius and I simply don't understand it. After all, nobody could write something that makes that little sense, could they?"

     

    Wait, never mind: that's what people think when they read the Lync Server PowerShell Haiku of the Day. Compared to the daily haiku, the email we got actually seems pretty straightforward. At least the email kind of makes sense.

     

    Kind of.

     

    At any rate, we tip our hats to this unknown poet (the email was unsigned and the poet doesn't have a facbook account, so we didn't know how to track the author down). We admit it: he or she clearly has us beat when it comes to sheer poetry. Fortunately for us, however, we still have the one important item that all the great poets, from William Shakespeare to Lord Byron to Robert Frost, have always had: information about Microsoft Lync Server 2010 PowerShell!

     

    Note. OK, not that we've actually had any information about Lync Server PowerShell today, not yet anyway. But we were just about to get to all that.

     

    Today we thought we'd talk about the Set-CsMediationServer cmdlet. Why? Two reasons. For one, it's one of the rare Lync Server PowerShell cmdlets that Samuel Taylor Coleridge never discussed in his poems. (No, we checked; not even in The Rime of the Ancient Mariner.) Second, we have a meeting not too long from now, and we needed a cmdlet that we could dispose of quickly and easily. Set-CsMediationServer definitely fulfilled that second requirement.

     

    But mostly we wanted to try and top Samuel Taylor Coleridge.

     

    Note. Although we have to give Coleridge credit. The Rime of the Ancient Mariner is divided into 7 parts, and the parts all have titles like these:

     

    Part the First

    Part the Second

     

    We're kicking ourselves for not thinking of that before Coleridge did. If we had, then this would be Haiku the 121st instead of Haiku #121. First an unknown poet from Bulgaria or some place like that, and then Samuel Taylor Coleridge. Isn't there a poet anywhere in the world that we're better than?!?

     

    Um, you know you really didn't have to answer that question.

     

    But hey, let's talk about Set-CsMediationServer. As you probably know, the Mediation Server acts as a sort of middleman between your internal Enterprise Voice network and the external Public Switched Telephone Network (the infamous PSTN). Mediation Server offers one way for your Enterprise Voice users to be able to communicate with people using (gasp!) old-fashioned landline phones, cell phones, or any other device connected to the PSTN.

     

    Which, needless to say, is a pretty nice little feature to have at your disposal.

     

    As you might expect, the Set-CsMediationServer cmdlet is used for managing and configuring your Mediation Servers; if it wasn't used for that they probably would have given it a very different name. Generally speaking, managing a Mediation Server means doing one of two things: 1) configuring the ports used for such things as audio, TCP, and TLS traffic; and, 2) associating the Mediation Server with a particular Registrar and/or Edge Server. For example, here's a command that assigns a Mediation Server to the Registrar atl-cs-001.litwareinc.com:

     

    Set-CsMediationServer -Identity "MediationServer:atl-media-001.litwareinc.com"  -Registrar "atl-cs-001.litwareinc.com"

     

    And here's a command that assigns port 5068 to the SIP client TCP port, the port used for communicating with gateway peers via the TCP protocol:

     

    Set-CsMediationServer -Identity "MediationServer:atl-cs-001.litwareinc.com" -SipClientTcpPort 5068

     

    Needless to say, there's nothing too terribly difficult about that.

     

    In fact, there's nothing too terribly difficult about any of the parameters used with Set-CsMediationServer; instead, there are just a few things to be aware of.

     

    Like what, you ask? Well, let's start with this: if you change a port on a Mediation Server, that change won't take effect until the Mediation Server service has been restarted. That has nothing to do with the Set-CsMediationServer cmdlet; that's just the way the service itself works.

     

    Second, note that there's no Get-CsMediationServer cmdlet. Does that mean you can't retrieve the current settings for your Mediation Servers? Nope; it just means you have to use the Get-CsService cmdlet, like so:

     

    Get-CsService –MediationServer

     

    And then there's this: the Set-CsMediationServer cmdlet doesn't accept pipelined input. Does that make any difference to us? Well, it might. After all, suppose you want to assign port 5068 to all your Mediation Servers. In that case, you might expect a command like this one to work:

     

    Get-CsService | Set-CsMediationServer -SipClientTcpPort 5068

     

    Unfortunately, that command won't work. Instead, you'll just get an error message similar to this:

     

    Set-CsMediationServer : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.

     

    What does that mean? Beats us. About all we do know is that the only way to change a bunch of Mediation Servers using a single command is to pipe the data to the ForEach-Object cmdlet instead:

     

    Get-CsService | ForEach-Object {Set-CsMediationServer –Identity $_.Identity -SipClientTcpPort 5068}

     

    That should do the trick.

     

    And that should also do it for today: not only do we have a meeting to attend, but we also have to brush up on our poetry a bit. Are we going to let some unknown poet from Bulgaria beat us? Well, now that you mention it, yes, we are. But we still think we can top Samuel Taylor Coleridge:

     

    My sire is of a noble line,

    And my name is Geraldine:

    Five warriors seized me yestermorn,

    Me, even me, a maid forlorn:

     

    Come on now: rhyming noble line and Geraldine? And ”yestermorn"? Is that even a word? We can definitely take Coleridge. Any day of the week.

     

     

     

  • One of These Things is Not Like the Others: Challenge 19: Answer

     

    Now here's something you don't see every day: we made a big mistake in last week's challenge. (Well, OK, maybe that is something you see every day after all.) Last week we asked you which of the following four Lync Server PowerShell cmdlets was not like the others:

     

    New-CsNetworkInterface

    New-CsNetworkRegion

    New-CsNetworkSite

    New-CsNetworkSubnet

     

    Everyone who submitted an answer for last week's challenge came up with the same answer: New-CsNetworkInterface. And why did they come up with that answer? That's easy: the other three cmdlets actually exist. New-CsNetworkInterface doesn't exist.

     

    So were we just giving you an easy one, or maybe trying to trick you by throwing in a cmdlet that doesn't actually exist? Would you believe us if we said yes, that's exactly what we were doing? We didn't think so.

     

    Instead, we screwed up. We were supposed to ask you which of the following Lync Server PowerShell nouns was not like the others:

     

    CsNetworkInterface

    CsNetworkRegion

    CsNetworkSite

    CsNetworkSubnet

     

    That would have been at least at little more challenging. In that case, the correct answer would have been CsNetworkInterface. Why? Because, even though all four cmdlets have the word Network in their name, CsNetworkInterface is the only cmdlet that doesn't deal with CAC: the Call Admission Control service. Instead, that cmdlet is used simply to return information about the network interfaces used on a computer.

     

    However, for some weird reason we stuck New- in front of each noun name and instead issued a challenge that was way too easy, especially for all of you guys. Hey, you owe us one!

     

    On the bright side, we have one last challenge for you this week. Did we do this week's challenge correctly? We're not going to say yes, but we're not going to say no, either. After all, stranger things have happened.

     

    And no, we can't think of anything rarer than us actually doing something right for a change. But surely there must be something stranger than that.

     

     

    Challenge Home

     

     

     

     

     

     

     

  • One of These Things is Not Like the Others: Challenge 20

     

    Well, you know what they say: all good things must come to an end. And so, too must the Lync Server PowerShell One of These Things is Not Like the Others challenge.

     

    Listen, go ahead and cry: there's nothing to be ashamed of. (Needless to say, we've been bawling our eyes out all morning.) But it's true: this will be the final challenge, at least for the time being. Way back in January, when we issued the first challenge, we decided we'd run the competition for 20 weeks, and then move on to something else. And this, alas, is week number 20. Time truly does fly when you're having fun, doesn't it?

     

    And it also seems to fly when you're doing the Lync Server PowerShell One of These Things is Not Like the Others challenge.

     

    But hey, chin up: instead of focusing on the sad times, let's focus on the good times. For example, remember all the great moments in challenge history, moments like these:

     

    ·          

    ·          

     

    OK, never mind. Seeing as how we couldn't actually come up with any good times, you might as well focus on the sad times after all.


    Ah, good question: when we say "move on to something else" does that mean that the One of These Things is Not Like the Others challenge will be replaced by some other sort of contest/competition? We'll see. We definitely have a few ideas for replacement competitions, but we're not sure how much time we're going to have to devote to those sorts of things. But never say never, right? After all, people said Thomas Dewey would never defeat Harry Truman and be elected President of the United States and – well, OK, bad example. But you know what we mean.

     

    But none of that matters right now; what matters right now is that we have one last challenge to issue (and yes, it's an easy one, just to make sure everyone ends on a winning note). Which of these Lync Server Windows PowerShell cmdlets is not like the others:

     

    Set-CsVoiceNormalizationRule

    New-CsVoiceRegEx

    Set-CsOutboundTranslationRule

    New-CsSipResponseCodeTranslationRule

     

     

     

    Challenge Hint

    Challenge Answer

     

    Challenge Home

     

     

     

     

  • Haiku #120

    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.

     

     

     

  • Not Like the Others: Challenge 19: Hint

    Ah, yes: it’s Thursday, and time for a hint to help you solve this week’s Lync Server One of These Things is Not Like the Others challenge. This week’s hint is courtesy of Dr. Seuss:

     

    Ack, back, ---, gak, hack, lack, mac, knack, pack, rack, sack, tack, whack, yak, Zach.

     

    OK, so maybe the hint isn’t really from Dr. Seuss (although we won’t be surprised if they end up making it into a movie starring Jim Carrey). But Seuss or no Seuss, it’s the only hint you’re going to get this week, so try and make the best of it.

     

     

    Challenge Home