Haiku #101
Published May 20 2019 03:28 PM 165 Views
Brass Contributor
First published on TECHNET on May 02, 2011





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?)





Version history
Last update:
‎May 20 2019 03:28 PM
Updated by: