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

    So, you've come back for more, have you? Well, that's good, because this week we have yet another of our Lync Server PowerShell One of These Things is Not Like the Others challenges. Last week we posted a challenge that didn't necessarily have a right answer: we had something in mind, but we purposely left things a little open-ended, just so we could see what everyone else came up with. This week, however, we actually do have something in mind and, we'll warn you right now, it's a little tricky. If you get it right, there's little doubt that, generations from now, people will still be singing your praises. And what if you get it wrong, will you lose your job and be forced to live in shame for the rest of your life? Well, if it was up to us, yes, that's exactly what would happen.

     

    But, then again, that's why no one ever leaves anything up to us.

     

    At any rate, if you think you're up to it, here's this week's challenge. Which of the following Lync Server PowerShell cmdlets is not like the others:

     

     

    Set-CsManagementConnection

    Get-CsUICulture

    Test-CsComputer

    Set-CsMediationServer

     

     

    No kidding? We get goose bumps just thinking about that, too.

     

    Challenge 16 Hint

    Challenge 16 Answer

     

    Challenge Home

     

     

     

     

     

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

    OK, we admit it: last week we took the easy way out when it came to the Lync Server PowerShell One of These Things is Not Like the Others challenge. When it comes to doing these challenges, it's always easy to come up with a question: you just grab four cmdlets at random and say, "Which of these cmdlets is not like the others?" What's hard is figuring out which if those cmdlets is not like the others. Usually we try to come up with a reasonably good answer to our own question. Last week the best we could do was come up with some kind of answer to our own question. To tell you the truth we basically just threw up a question and relied on everyone out there to come up with a good answer to it. Fortunately, you guys didn't let us down: you gave us all sorts of good answers.

     

    Whew.

     

    In case you missed it, here's the question we asked last week, followed by some of the responses we received:

     

     

    Set-CsCpsConfiguration

    Set-CsClientPolicy

    Set-CsRgsConfiguration

    Set-CsHealthMonitoringConfiguration

     

     

    We have to admit that we were a little surprised by this, but nearly everyone who submitted an entry for Challenge 15 settled on Set-CsHealthMonitoringConfiguration as the one cmdlet that was not like the others. Why? Well, as Johann D., Tom A. and Aleksandr R. all pointed out, Set-CsHealthMonitoringConfiguration is the only one of the four that has a required parameter; the other three cmdlets have only optional parameters. Did we realize that Set-CsHealthMonitoringConfiguration was the only one of the four cmdlets that had a required parameter? We'll answer that question by asking a different question: how in the world did everyone but us notice that?

     

    Ella W., Ramkumar R., and Matt S. also tabbed Set-CsHealthMonitoringConfiguration, albeit for a slightly different reason: as they pointed out, Set-CsHealthMonitoringConfiguration is used only to run synthetic transactions that let you test the health of the system. What the cmdlet doesn't do is impact the behavior of users or of client devices. And, as Matt noted, it's the only one of the four that that doesn't affect voice-related settings. Did we notice any of that? We'll answer that question by asking a different question: why do you keep asking us questions like that? You already know the answer.

     

    There was at least one holdout for Set-CsClientPolicy, however. As Makovec. noted, Set-CsClientPolicy is the only cmdlet that can affect per-user settings; that is definitely not the case with the other three cmdlets. But at least we were aware of that, right? Ah, come on, guys: give us break, OK?

     

    So what was the answer that we had in mind? Well, we're a little embarrassed to admit it now, but we also picked Set-CsHealthMonitoringConfiguration. Why? Well, it was the only one of the four that didn't have anything to do with playing music on hold. Set-CsCpsConfiguration has an EnableMusicOnHold parameter; Set-CsClientPolicy has a couple of music-on-hold parameters; and Set-CsRgsConfiguration lets you set the default file location for Response Group music on hold. But Set-CsHealthMonitoringConfiguration? That cmdlet has nothing to do with music on hold.

     

    Hey, it was the best we could come up with. After all, we're just technical writers: you can't expect us to know anything about the product.

     

    At any rate, thanks to everyone who submitted an answer for last week's challenge. Do we have yet another challenge waiting for you this week? You already know the answer to that question, too.

     

    Challenge Home

     

     

     

     

     

  • Haiku #101

    Where, oh where have my

    Subnets gone? I should have used

    CsLisSubnet.

     

    Before we get started today we should offer an update to last Friday's haiku. Last Friday we implied that the Royal Wedding and the 100th edition of the Lync Server PowerShell Haiku of the Day were probably the two most thrilling and exciting things going on in the entire world. There's no doubt that the 100th haiku and, to a lesser extent, the Royal Wedding, captivated and entranced a large number of people. In our zeal to report on those two events, however, we totally neglected to report on the one world-changing event to take place in the past few weeks: Apple announced that the iPhone will now come in white!

     

    Note. If you're wondering why the iPhone now coming in white as well as black counts as a truly world-changing event, well, that can only mean one thing: you're just not cool. We know that, because the author of today's haiku doesn't understand why the iPhone now coming in white as well as black counts as a truly world-changing event, and, let's face it, the author of today's haiku is about as far from cool as you can possibly get.

     

    In case you're wondering, the iPhone originally came out in 2007, in black only. People have apparently been clamoring for a white version ever since, but it took Apple four years to produce one. As Apple VP Fred Schiller noted in an interview (and yes, Steve Jobs also participated in that interview, which is understandable considering the monumental importance of the event), "It was challenging. It's not as simple as making the thing white." So there you go.

     

    Note. Having now cracked the age-old problem of making a white version of something that used to come only in black, will there someday be, say, a charcoal-gray version of the iPhone? That's probably too much to hope for, but, hey, you never know.

     

    The one problem with having a white iPhone is this: it draws attention away from the Lync Server PowerShell Haiku of the Day. That's why we decided to fight fire with fire. Apple wants to talk about a white iPhone? Fine. We'll counter with this: the CsLisSubnet cmdlets!

     

    Note. Hey, all's fair in love and war, right?

     

    The CsLisSubnet cmdlets (Get-CsLisSubnet, Remove-CsLisSubnet, and Set-CsLisSubnet) are part of the Enhanced 9-1-1 (E9-1-1) system introduced in Lync Server 2010; this system allows an emergency operator to identify the location of an Enterprise Voice caller without having to ask the caller for that information. As you might have guessed, the CsLisSubnet cmdlets (in particular, the Set-CsLisSubnet cmdlet) are used to specify the physical location of your network subnets.

     

    In other words, the Set-CsLisSubnet cmdlets let you do things like this:

     

    Set-CsLisSubnet –Subnet 192.168.0.0 –HouseNumber 1 –StreetName Microsoft –StreetSuffix Way –Location “Building 13” –City Redmond –State WA –PostalCode 98052

     

    See how that works? All we're doing here is saying that subnet 192.168.0.0 can be found here:

     

    Building 13

    1 Microsoft Way

    Redmond, WA 98052

     

    You're right: that is pretty cool. But sometimes cool things can be a little tricky to work with (as anyone who's ever tried to make a call with an iPhone would know). That's definitely the case with the Set-CsLisSubnet cmdlet: there are a few little tricks you need to know about, starting with the fact that you use the Set-CsLisSubnet cmdlet to create a new subnet. Why don't you use the New-CsLisSubnet cmdlet to create a new subnet? That's easy: because there's no such thing as the New-CsLisSubnet cmdlet. Instead, Set-CsLisSubnet is used both to create new subnets and to modify existing subnets. When you run the previous command, Set-CsLisSubnet looks to see if subnet 192.168.0.0 already exists in the location database. If it does, then it modifies the existing subnet using the specified parameter values. And if doesn't? Then it creates a brand-new subnet with the IP address 192.168.0.0. It's a bit out-of-the-ordinary, but that's the way the E9-1-1 cmdlets typically work.

     

    And here's another thing you need to know. Let's say we just created our new subnet, a subnet that has the following property values:

     

    Subnet            : 192.168.0.0.

    Description       :

    Location          : Building 13

    CompanyName       :

    HouseNumber       : 1

    HouseNumberSuffix :

    PreDirectional    :

    StreetName        : Microsoft

    StreetSuffix      : WA

    PostDirectional   :

    City              : Redmond

    State             : WA

    PostalCode        : 98052

    Country           :

     

    We look at that and think, "Oh, shoot: I forgot to include the company name." With that in mind, you run a command like this one:

     

    Set-CsLisSubnet –Subnet 192.168.0.0 –CompanyName Microsoft

     

    Was that a good thing to do? Well, maybe. But, then again, maybe not. After all, take a look at the properties for that subnet after you run the preceding command:

     

    Subnet            : 192.168.0.0.

    Description       :

    Location          :

    CompanyName       : Microsoft

    HouseNumber       :

    HouseNumberSuffix :

    PreDirectional    :

    StreetName        :

    StreetSuffix      :

    PostDirectional   :

    City              :

    State             :

    PostalCode        :

    Country           :

     

    As you can see, when you call Set-CsLisSubnet, it replaces all the existing property values with the parameter values specified in the command. We only specified one parameter value (CompanyName) in our command, so Set-CsLisSubnet dutifully updated the value of the CompanyName property and deleted all the other property values (that is, all the unspecified property values).

     

    That's pretty much what we said.

     

    Fortunately, there's a pretty easy way to work around this problem: use the Get-CsLisSubnet cmdlet to retrieve the subnet in question and then use Set-CsLisSubnet to modify that one property value. This is the command we should have used:

     

    Get-CsLisSubnet | Where-Object {$_.Subnet –eq "192.168.0.0"} | Set-CsLisSubnet –CompanyName Microsoft

     

    Had we done that, we would have updated the CompanyName property and retained all our other property values as well:

     

    Subnet            : 192.168.0.0.

    Description       :

    Location          : Building 13

    CompanyName       : Microsoft

    HouseNumber       : 1

    HouseNumberSuffix :

    PreDirectional    :

    StreetName        : Microsoft

    StreetSuffix      : WA

    PostDirectional   :

    City              : Redmond

    State             : WA

    PostalCode        : 98052

    Country           :

     

    Which is probably more what you had in mind.

     

    We're not sure if all that trumps the introduction of the white iPhone, but we're hoping it does. We should note, however, that all the CsLisSubnet cmdlets are exactly the thickness you would expect them to be. That's not true for the white iPhone, however: as it turns out, the white iPhone is 0.2 millimeters thicker than the black iPhone. This has caused a certain amount of unrest and disruption, because some people who own black iPhones are finding that the cases for those phones won't always fit the new white phones. That's definitely a huge issue.

     

    And if you're wondering why someone who already owns a black iPhone had to immediately rush out and buy a white iPhone, well, like we said, maybe you're just not as cool as you thought you were.

     

    Or, even worse: maybe you're only as cool as the author of today's haiku. (Perish the thought, huh?)

     

     

  • Haiku #102

    And if I haver

    Then I must not be running  

    CsReplica.

     

    Back in the 1990s, the Scottish folk rock band The Proclaimers released a song – I'm Gonna Be (500 Miles) – that included these lyrics:

     

    And if I haver

    Yeah I know I'm gonna be

    I'm gonna be the man who's havering to you

     

    Note. Yes, that is remarkably close to being a haiku, isn't it? Spooky.

     

    Although he liked the song, the author of today's haiku never knew what it meant to "haver." And every time he's heard that song over the past 15 or 20 years (however long it's been since the song was released) he's always said to himself, "What the heck does it mean to 'haver?'"

     

    Note. Seeing as how this is the Age of the Internet, couldn't he have just looked up the word haver? Well, yeah, maybe. But, then again, what with all these daily Lync Server PowerShell haikus and stuff he has been kind of busy the last 20 years.

     

    However, this morning, while reading something that had nothing to do with Scottish folk rock, he learned the truth: to "haver" means to talk nonsense, to prattle on endlessly without making the least bit of sense. Case closed!

     

    Note. What's that? You say that the author of today's haiku should be an expert on anything having to do with prattling on endlessly without making the least bit of sense? Interesting. Why would you say that?

     

    At any rate, having solved one of the two great mysteries of life, the author of today's haiku decided to go for a clean sweep and tackle the other great mystery of life as well: what is the Enable-CsReplica cmdlet, and why would you ever want to use it?

     

    Let's start by explaining what the Enable-CsReplica cmdlet actually does. As you know, any computer that runs a Lync Server service server role has to be added to the Lync Server replication path; that's the only way that computer can get updates from the Central Management store. What does the Enable-CsReplica cmdlet do? You got it: it adds the local computer to the replication path, which means that the local store (the copy of the Lync Server configuration settings stored on the local computer) will then start receiving updates sent out by the Central Management store.

     

    So much for "What is the Enable-CsReplica cmdlet?" Now let's take a look at the next question: Why would you ever want to use this command?

     

    To be honest, as a Lync Server administrator you might never want to use this cmdlet. When you install a Lync Server service or server role the setup program will automatically call the Enable-CsReplica cmdlet for you and, as a result, will automatically add the local computer to the replication path. Setup does the work, and you can spend your time singing Scottish folk songs. We'd recommend My Bonnie Lies Over the Ocean.

     

    Note. In Scottish, the word "bonnie" means pretty or charming. And no, we are not just havering here.

     

    However, there's always the possibility that something could go wrong with the setup program; in that case, you might need to call Enable-CsReplica yourself. You might also need to call the cmdlet if you happen to be dabbling in creating your own trusted applications for Lync Server. This is a bit outside our area of expertise (we consider ourselves to be Scottish linguists more than we do developers), but if you're planning to create and activate an auto-provisioned trusted application you need to complete the following procedure:

     

    1. Ensure that any computers on which the application will run are joined to the domain. (Kind of a no-brainer, but, still ….)
    2. Install the Central Management Store replication service. (Something you do using Bootstrap.exe.)
    3. Enable Central Management Store replication. (Something you do – that's right: something you do using our old friend Enable-CsReplica.)
    4. Assign a certificate that lets the Lync Server 2010 topology know about the trusted application computer.

     

    But, again, that's something most administrators won't have to worry about.

     

    Oh, and if you ever do need to run Enable-CsReplica, well, you're in luck: calling the cmdlet is pretty darn easy. Just run this command from the computer that needs to be added to the replication path:

     

    Enable-CsReplica

     

    And yes, as a matter of fact we do get paid for writing in-depth technical commands such as the one we just showed you. Why do you ask?

     

    And if you want to get really fancy, you can add the Report parameter and specify a location where the log file generated when you run Enable-CsReplica will be stored:

     

    Enable-CsReplica –Report "C:\Logs\EnableReplica.htm"

     

    Could you have figured that out without our help? Probably. But let's keep that our little secret. The author of today's haiku still has a mortgage to pay off.

     

    Before we go today we thought we'd leave you with a verse from the Scottish folk song Braes of Killiecrankie:

     

    Where hae ye been sae braw, lad?
    Where hae ye been sae brankie-o?
    Where hae ye been sae braw, lad?
    Cam' ye by Killiecrankie-o?

     

    Which means … well, tell you what: we'll get back to you in another 15 or 20 years on that.

     

     

     

  • Haiku #103

    It is all black and

    White: cmdlets can help with

    Dial-in conferencing.

     

    Last night the author of today's haiku caught part of a very weird movie: The Story of Seabiscuit, starring Shirley Temple. What was so weird about the movie? Well, for one thing, the movie kept changing from color to black-and-white and then back to color. Apparently the filmmakers had newsreel footage of the horse Seabiscuit that they wanted to incorporate into the movie; however, that footage was all shot in black-and-white. Therefore, the movie would be in color, and the horses would show up at the starting gate in color. As soon as the race began, however, the horses (and the movie) would turn black-and-white. And then, when the race was over, everything would be back in color again.

     

    Note. Well, except for one section showing the family at the race track discussing the race. For some reason, that, too was shot in black-and-white. We can only assume that, by the time they shot the race track scene, even the director was confused as to whether this was a color movie or a black-and-white movie.

     

    At any rate, the effect of constantly switching from black-and-white to color was really strange, and almost made the author of today's haiku vow to give up drinking.

     

    Almost.

     

    The constant switch from black-and-white to color also seemed to have an effect on Shirley Temple, who was playing a nurse whose brother had died in a tragic steeplechase accident. Shirley was supposed to be from Ireland, but her Irish accent kept fading in and out along with the color.

     

    If you've ever wondered what it must have been like to be in Haight-Ashbury during the 1960s, well, we recommend you watch The Story of Seabiscuit. What a long, strange trip it's been.

     

    To be honest, The Story of Seabiscuit was probably no worse than many of the movies released in 1949. (Although Bride of Vengeance and Chicken Every Sunday sound pretty good.) However, it does introduce a little uncertainty into our otherwise untroubled times: after all, if you can't rely on a Shirley Temple movie, what can you rely on?

     

    Listen: don't despair. As it turns out, there is one thing you can still rely on: the CsConferenceDirectory cmdlets (Get-CsConferenceDirectory, Move-CsConferenceDirectory, New-CsConferenceDirectory, and Remove-CsConferenceDirectory).

     

    So what are the conference directory cmdlets for and, while we're on the subject, what exactly is a conference directory? Well, without getting too detailed, any time you create a dial-in conferencing URI that URI is assigned a unique SIP addresses. That's the good news: it makes it easy for a SIP-aware device (like Microsoft Lync) to connect to that conference.

     

    The bad news? SIP URIs are difficult for non-SIP-aware devices, like a PSTN telephones, to work with; for example, your cell phone has no idea what a SIP URI is. In turn, that would seem to make it impossible for users to use a PSTN phone to dial in for the audio portion of the conference.

     

    Well, it would seem to be impossible. The fact that it isn't impossible is due to conference directories, which help non-SIP-aware devices locate, and connect to, dial-in to conferences. How do they do this? Well, conference directories are identified by an integer value (which PSTN phones can deal with) instead of a SIP URI. By associating one of these integer values with a SIP URI (something that Lync Server does under the covers) you provide a way for dial-in users to find the conference.

     

    Look at it this way. Suppose you were holding a meeting in the lobby of Building 38; most likely you would tell people, “Just look for Building 38 and you’ll find the conference.” That’s like handing out the URI to a conference: you’re giving people the exact address where the conference will be held.

     

    However, suppose you had someone who couldn’t read numbers; he or she has no idea what a 38 was. In that case, you’d have to give that person different instructions; you might have to tell them “Look for the two-story brick building and you’ll find the conference.” That’s sort of what’s going on here. The conference directory is used for people (well, devices) that don’t know what a SIP URI is.

     

    Like we said, that’s sort of what’s going on here. But it’s good enough for now.

     

    Each time you create a new Registrar pool in Lync Server a conference directory will automatically be created for that pool. Is one conference directory per pool sufficient? Well, that depends on how many users are homed on that pool. Officially, we recommend one conference directory for every 999 users.

     

    Note. Why 999 users? Why not an even 1,000 users? Because … well, because.

     

    So how do you know how many conference directories you have? Well, here's an easy way to list all your conference directories:

     

    Get-CsConferenceDirectory

     

    And here's a way to list all the conference directories on a particular pool, in this case, atl-cs-001.litwareinc.com:

     

    Get-CsConferenceDirectory | Where-Object {$_.ServiceID -match "UserServer:atl-cs-001.litwareinc.com"}

     

    Or, if you just want the total number of conference directories for that pool, run this command:

     

    (Get-CsConferenceDirectory | Where-Object {$_.ServiceID -match "UserServer:atl-cs-001.litwareinc.com"}).Count

     

    Note. OK, that command tells you how many conference directories you have. Now, how do you know how many users are homed on that same pool? Here's how:

     

    (Get-CsUser –Filter {RegistrarPool –eq "atl-cs-001.litwareinc.com"}).Count

     

    So let's suppose you decide that you do need to create a new conference directory or two; what then? Well, then all you do is call the New-CsConferenceDirectory cmdlet, specifying the pool where the directory should be created as well as a unique integer value for the new directory. For example:

     

    New-CsConferenceDirectory –HomePool atl-cs-001.litwareinc.com –Identity 2

     

    Incidentally, the Identity can be any unique integer between 0 and 9999, inclusive. And it can literally be any unique integer value. For example, suppose you have conference directories 1, 2, and 3. Does your next conference directory have to have the Identity 4? Nope; it can be 38 or 698 or 3247. It's entirely up to you.

     

    Note. OK, so how would you know whether or not you already have a conference directory named 3247? Try running this command:

     

    Get-CsConferenceDirectory | Where-Object {$_.Identity –eq 3247}

     

    If you decide that you have too many conference directories, you can always get rid of some of them by using the Remove-CsConferenceDirectory cmdlet:

     

    Remove-CsConferenceDirectory –Identity 3247

     

    Note that, when you do this, you'll be presented with a confirmation prompt that asks if you really want to delete the conference directory. That probably shouldn't be too much of a problem, especially considering the fact that you probably won't be removing conference directories on a regular basis. However, if you just hate having to answer prompts like that, you could always set your confirmation preferences to None. We don't necessarily recommend that, unless you do so in a script that will then immediately reset those preferences. If you're interested in that, take a peek at this article.

     

    And what if you want to move a conference directory, perhaps because the pool that the directory currently resides on is being decommissioned? That's fine; that's what the Move-CsConferenceDirectory cmdlet is for:

     

    Move-CsConferenceDirectory -Identity 3 -TargetPool atl-cs-002.litwareinc.com

     

    And there you have it: The Story of the CsConferenceDirectory cmdlets. We'll see you all tomorrow!