Ancient relics from
A time that has long since passed.
According to cartoons (which is where the authors of the Lync Server PowerShell blog have gotten most of their knowledge about history and culture), back in the 1950s the ultimate insult was to tell someone that “your mother wears army boots!”
Of course, times have changed since the 1950s (when gas was 14 cents a gallon and stamps 3 cents apiece). These days, telling someone that their mother wears army boots doesn’t draw much of a reaction; after all, their mother probably does wear army boots (along with Spandex bike shorts, an oversized T-shirt, and multiple rubber wristbands stamped with slogans like WWTLSPBWD: What Would the Lync Server PowerShell Blog Writers Do). In other words, if you’re looking for someone to insult (um, besides us, that is) the old standby “Your mother wears army boots” just won’t do. Instead, you need to get really nasty and really mean. You need to tell them, and pardon our language here, you need to tell them: you’re so analog!
That’s right: in this digital world of ours, nothing could be worse than to be branded – gasp! – analog. After all, analog is old, analog is outdated, analog is outmoded, antiquated, and just plain useless and archaic.
And yet, even though it is a digital world, there are still plenty of analog devices that need to be maintained and administered, just like their flashy digital counterparts; this includes things like telephones, fax machines, modems, teletype/telecommunication device for the deaf (TTY/TDD) devices, and other contraptions connected to the public switched telephone network. That’s all well and good, except for one thing: in a digital world, how the heck are you supposed to manage analog devices?
After consulting our WWTLSPBWD wristband, we decided to do what the authors of the Lync Server PowerShell blog would do: we’d use the CsAnalogDevice cmdlets included in Microsoft Lync Server 2010 in order to manage our analog devices. (For the record, that’s Get-CsAnalogDevice, Move-CsAnalogDevice, New-CsAnalogDevice, Remove-CsAnalogDevice, and, everyone’s favorite, Set-CsAnalogDevice.) The CsAnalogDevice cmdlets provide a way for you to create Active Directory contact objects that represent your individual analog devices (like old-fashioned telephones or fax machines). For example, this command creates a contact object that represents the telephone with the phone number (425)555-6001:
New-CsAnalogDevice -LineUri tel:+14255556001 -DisplayName “Building 14 Receptionist” -RegistrarPool redmond-Cs-001.litwareinc.com -AnalogFax $False -Gateway 192.168.0.240 -OU “ou=Telecommunications,dc=litwareinc,dc=com”
Big deal, you say? Well, you’re absolutely right: this is a big deal. After all, as soon as your analog device has a corresponding contact object you can do things like assign dial plans and voice policies to that contact object; in turn, that then allows you to manage your old-fashioned analog device in the exact same way you manage your cool new digital devices. For example, this command assigns the voice policy RedmondVoicePolicy to our newly-created contact object:
Grant-CsVoicePolicy –Identity “Building 14 Receptionist” –PolicyName “RedmondVoicePolicy”
Once you’ve done that, everything allowed (or not allowed) by the voice policy RedmondVoicePolicy will apply to your analog phone. If that’s not cool, well, then we don’t know what is.
And if you’re one of those people who cringe at the idea of having to use two whole commands in order to carry out a task, well, we have good news for you: you can create a new analog device and assign a policy (or policies) using just one command. To do that, just be sure you include the PassThru parameter when calling New-CsAnalogDevice; that ensures that the contact object you just created will be passed through the pipeline and thus get handed off to the next cmdlet (e.g., Grant-CsVoicePolicy). You need to do that because, by default, New-CsAnalogDevice does not pass objects through the pipeline: without the PassThru parameter, New-CsAnalogDevice will create the new contact object and then quit right then and there.
Here’s an example of how you can create a new analog device contact and assign that contact a voice policy, all with one command (and possibly with one hand tied behind your back):
New-CsAnalogDevice -LineUri tel:+14255556001 -DisplayName “Building 14 Receptionist” -RegistrarPool redmond-Cs-001.litwareinc.com -AnalogFax $False -Gateway 192.168.0.240 -OU “ou=Telecommunications,dc=litwareinc,dc=com” –PassThru | Grant-CsVoicePolicy –PolicyName “RedmondVoicePolicy”
And there you have it: not only is it OK if your mother wears army boots, but it’s also OK if she still uses an analog phone.
What a great time to be alive, eh?