For they are the most

Interesting cmdlets

In the world: LisSwitch.

 

If you watch any TV at all (and, come on, admit it: everyone watches at least some TV) then you've no doubt seen the Most Interesting Man in the World commercials. These commercials feature, well, the most interesting man in the world, and consist largely of a recitation of his many noteworthy accomplishments:

 

·         In museums, he's allowed to touch the art.

·         He once had an awkward moment, just to see what it was like.

·         Sharks have a week devoted to him.

·         People hang on his every word, including the prepositions.

 

Note. In case you're wondering, the answer is no: although the Most Interesting Man in the World does sound a lot like the author of today's haiku, we have no interest in suing.

 

Considering the success of the Most Interesting Man in the World ad campaign, we decided to steal the idea and come up with The Most Interesting Microsoft Lync Server 2010 PowerShell Cmdlets in the World. After a long, arduous, and highly-technical process (which consisted primarily of picking cmdlets at random and then seeing if there was any way we could cram that cmdlet name into our haiku), we came up with The Most Interesting Microsoft Lync Server 2010 PowerShell Cmdlets in the World: the CsLisSwitch cmdlets (Get-CsLisSwitch, Remove-CsLisSwitch, and Set-CsLisSwitch). Why the CsLisSwitch cmdlets? Here's why:

 

·         They allow you to associate a network switch with Location Information Service (LIS) locations.

 

And they … well, that was pretty much all we could come up with: They allow you to associate a network switch with Location Information Service (LIS) locations. For a while there we thought that sharks had a week devoted to the CsLisSwitch cmdlets, but it turns out it was the CsNetworkInterRegionRoute cmdlets instead. Dang!

 

But hey, let's not sell the CsLisSwitch cmdlets short: they might not do a lot of things, but associating network switches with LIS locations isn't anything to be ashamed of, either. As you probably know, the Location Information Service is used to configure addresses and locations for use with the Enhanced 9-1-1 (E9-1-1) system. Enhanced 9-1-1 allows an emergency operator to identify the location of a caller without having to ask the caller for that information. If a caller is calling from a Voice over Internet Protocol (VoIP) connection, that information must be extracted based on various connection factors. The VoIP administrator must configure a location map (called a wiremap) that is used to determine a caller’s location. The Set-CsLisSwitch cmdlet allows administrator to map physical locations to the network switch through which the client is connected.

 

And how do you map a physical location to a network switch using the Set-CsLisSwitch cmdlet? Here's how:

 

Set-CsLisSwitch -ChassisID 99-99-99-99-99-99 -Location "30/1000" -HouseNumber 1234 -PreDirectional NE -StreetName First -StreetSuffix Avenue -City Redmond -State WA -Country US -PostalCode 99999

 

As you can see, all you have to do is take the ChassisID property of the switch (in this case, 99-99-99-99-99-99) and, well associate it with a LIS location. That's pretty much all you have to do.

 

Note. If you aren't sure how to create a LIS location (like, say, you aren't totally sure what the PreDirectional parameter is for), take a look at the help information for the Set-CsLisLocation cmdlet.

 

That's about all we have time for – oh, wait: we just thought of something really interesting about the CsLisSwitch cmdlets. As we noted, there are three CsLisSwitch cmdlets: Get-CsLisSwitch, Remove-CsLisSwitch, and Set-CsLisSwitch. Notice anything missing? That's right: there's no New-CsLisSwitch cmdlet. And yet, in our preceding command, we created a new LIS switch. What gives?

 

Well, for some reason (and, to tell you the truth, we don't really know what that reason is) there aren't any New-CsLis cmdlets. (It's true: try running the command Get-Command New-CsLis* and see for yourself.) Instead, you use the Set-CsLisSwitch cmdlet both to create new switches and to modify existing switches. Remember this command:

 

Set-CsLisSwitch -ChassisID 99-99-99-99-99-99 -Location "30/1000" -HouseNumber 1234 -PreDirectional NE -StreetName First -StreetSuffix Avenue -City Redmond -State WA -Country US -PostalCode 99999

 

Well, suppose a switch with the ChassisID 99-99-99-99-99-99 (which, come to think of it, does sound like a fake ID number, doesn’t it?) already exists. In that case, the location information for that switch will be updated to reflect the newly-provided location information. (For example, the Location will be set to 30/100, the HouseNumber to 1234, etc.) And what if that particular switch doesn't exist in our LIS database? No problem; Set-CsLisSwitch will simply create the switch for you. It's like two, two, two cmdlets in one. But that's a totally different commercial, so we won't pursue that any further.

 

Note. We should also mention that Set-CsLisSwitch is the only quirky cmdlet in the set. Get-CsLisSwitch lets you retrieve information about your LIS switches, and Remove-CsLisSwitch enables you to delete a switch from the LIS database. After all, we don't want everything to be quirky; we just want to be able to associate network switches and LIS locations.

 

So there you have it: The Most Interesting Microsoft Lync Server 2010 PowerShell Cmdlets in the World. Remember: we don't always need to manage LIS switches for Lync Server 2010, but, when we do, we prefer to use the CsLisSwitch cmdlets.

 

Stay thirsty, Lync Server PowerShell users.