Haiku #58
You take the high road
And I'll take the low road. And
We'll get through somehow.
Today is actually a very big, very exciting day at the Lync Server PowerShell blog. Today's haiku is the 58th Lync Server PowerShell haiku we've published, meaning that we now hold the world's record for the most Lync Server PowerShell haikus ever published! Congratulations to us!
Note. OK, if you want to know the truth, we agree: it's probably not the most impressive world's record that anyone has ever held. Nonetheless, as the years go by it becomes less and less likely that the authors of the Lync Server PowerShell blog are ever going to hold the world's record for the 100-meter dash or the 400-meter freestyle relay. At this point in time, we're happy with any world's record we can lay claim to.
And now that we've grabbed the world's record for Lync Server haikus we've got our sights set on Georges Christen of Luxembourg, who holds the record for running just over 38 feet while holding a 26-pound table (and the 100-pound person sitting on that table) between his teeth.
It's just a matter of time, Georges.
Because this is such an auspicious occasion you might think that we would choose our very favorite cmdlet to write about today. And, if truth be told, we were going to do just that, except for one thing: there are so many good Lync Server cmdlets that we couldn't decide which one was our absolute favorite. Therefore, we decided to go with one of the quirkier Lync Server cmdlets: New-CsNetworkBWAlternatePath.
What's so quirky about New-CsNetworkBWAlternatePath? Well, for one thing, we don't even recommend that you use this cmdlet. Why not? Well, to explain that, let's first explain what New-CsNetworkBWAlternatePath is used for. New-CsNetworkBWAlternatePath is used in conjunction with the Call Admission Control (CAC) feature. CAC helps regulate bandwidth use in your organization. For example, you might place limits on voice and video calls made from one of your branch offices, an office located in an area that has less-than-reliable network connectivity. If the bandwidth limit for that office has been reached, then no new voice or video calls can be made until the additional bandwidth has been made available. (That is, until someone on an existing call hangs up.) All in all, a pretty useful little feature.
On the other hand, it might only be the primary network path that's currently clogged up; there could potentially be an alternate path that these calls could take. As an administrator you have the ability to allow calls to take an alternate path (assuming there is one) any time the primary path is jammed up. You can allow voice calls to take an alternate path and/or you can allow video calls to take an alternate path.
Got all that? Good, because now it gets quirky. The ability to use (or not use) alternate paths are set on your network regions. The Set-CsNetworkRegion and the New-CsNetworkRegion cmdlets each have three parameters related to alternate paths:
· AudioAlternatePath
· VideoAlternatePath
· BWAlternatePaths
What's so quirky about that? Well, the AudioAlternatePath parameter lets you enable or disable the ability of voice calls to use an alternate path; for example:
Set-CsNetworkRegion –Identity Redmond –AudioAlternatePath $True
The VideoAlternatePath parameter does the same thing for video calls:
Set-CsNetworkRegion –Identity Redmond –VideoAlternatePath $True
And then there's the BWAlternatePaths parameter, which can alternatively be used to enable or disable either (or both) the use of voice and video paths. (We told you it was quirky.) Here's a command that disables both voice and video paths for a region:
Set-CsNetworkRegion –Identity Redmond –AudioAlternatePath $False –VideoAlternatePath $False
Now here's how you can do the exact same thing using the New-CsNetworkBWAlternatePath cmdlet:
$a = New-CsNetworkBWAlternatePath –BWPolicyModality "audio" –AlternatePath $False
$b = New-CsNetworkBWAlternatePath –BWPolicyModality "video" –AlternatePath $False
Set-CsNetworkRegion –Identity Redmond –BWAlternatePaths $a, $b
As you can see, what we've had to do here is use New-CsNetworkBWAlternatePath to first create an in-memory alternate path object that disables the use of alternate audio paths; that path object gets stored in a variable named $a. We then repeat the process to create a second path object ($b) that disables video paths. We then, at long last, use Set-CsNetworkRegion and the BWAlternatePaths parameter to assign these two path objects to the Redmond region.
And if you're thinking, "Wow, that looks a lot more complicated than just using the AlternateAudioPath and AlternateVideoPath parameters," well, you're right: it is a lot more complicated. That's why we recommend that you don't use the New-CsNetworkBWAlternatePath cmdlet. Use this approach instead:
Set-CsNetworkRegion –Identity Redmond –AlternateAudioPath $False –AlternateVideoPath $False
Note. Don't worry. Take a few aspirin and your head will stop throbbing.
Eventually.
So what does this all mean? Well, to make a long story short, New-CsNetworkBWAlternatePath is a valid cmdlet and it works. But using the AudioAlternatePath and VideoAlternatePath parameters is much easier. Our advice? Just pretend that New-CsNetworkBWAlternatePath doesn't even exist.
Note. We'd tell you to pretend that the daily Lync Server PowerShell haiku doesn't exist either, but most people seem to have already figured out how to do that.
We should probably point out that, if you do use New-CsNetworkBWAlternatePath and the BWAlternatePaths parameter then you can't use AudioAlternatePath and/or VideoAlternatePath in the same command. A command like this one is destined to fail:
Set-CsNetworkRegion –Identity Redmond –BWAlternatePaths $a, $b –AudioAlternatePath $False –AlternateVideoPath $False
So use BWAlternatePaths if you want, or use AudioAlternatePath and VideoAlternatePath. Just don't get greedy and try to use them all at the same time. It won't work.
Oh, and just in case you're not confused enough as it is, here's what things look like when you run the Get-CsNetworkRegion cmdlet:
Identity : Redmond
Description :
BypassID : 810cc36h-e79c-4427-9c4a-8ab953d0bf77
CentralSite : NorthAmerica
BWAlternatePaths : {BWPolicyModality=Audio;AlternatePath=False,
BWPolicyModality=Video;AlternatePath=False}
NetworkRegionID : Redmond
If you look closely, you won't see properties named AudioAlternatePath or VideoAlternatePath. Instead, both of those values get displayed as part of the BWAlternatePaths property. Why? Because (alas) that's just the way things work.
Which, we admit, is not a very good answer. But it's the only answer we have.
Note. Actually, we do have an answer that’s a little better. The original idea was to make the network region extensible, so at some future date there could be more modalities than just audio and video. But right now there aren’t, so the AudioAlternatePath and VideoAlternatePath parameters were actually added to make it easier to create a network region with the currently available modalities.
That answer was a little better, wasn’t it?
If this makes absolutely no sense whatsoever (and we wouldn't be surprised; we're not totally convinced that we understand how it works, either) just drop us a line and we'll see if we can figure out a better way to explain it.
In the meantime, we have world records to set. Did you know that Ashrita Furman of the U.S. is the fastest person to ever push an orange one mile with their nose: 22 minutes and 41 seconds? Or, more correctly, we should note that Ashrita Furman is currently the fastest person to ever push an orange one mile with their nose.
Note. In case you're wondering, the old record for most Lync Server PowerShell haikus ever published was 57, set by us. The record before that was 56, also set by us. The record before that was – well, you get the idea.