All cmdlets are

Equal. We agree. Except

For voice policies.

 

Today's literary allusion (and, really, how could anyone write an article about Microsoft Lync Server PowerShell without having at least one literary allusion?) comes from George Orwell's classic satire Animal Farm. In Animal Farm, the animals on an English farm revolt, get rid of their drunken human overseer, and set up an animal utopia. As part of this utopia they draw up the Seven Commandments of Animalism, including this one:

 

All animals are equal.

 

Of course, as time goes by, the ruling animals inevitably become corrupt. (Animals: so unlike people.) Eventually, the Seven Commandments of Animalism are reduced to this one:

 

All animals are equal, but some animals are more equal than others.

 

So why the allusion to George Orwell's Animal Farm? Well, as it turns out, this same sort of thing is true in Lync Server PowerShell. In Lync Server PowerShell, all cmdlets are equal. But some cmdlets are more equal than others.

 

Yes, it's true: as much as we love all the Lync Server cmdlets (where would we be without New-CsSipProxyUseDefaultCert?) there's no doubt that some cmdlets, like the CsVoicePolicy cmdlets (Get-CsVoicePolicy, Grant-CsVoicePolicy, New-CsVoicePolicy, Remove-CsVoicePolicy, Set-CsVoicePolicy, and, last but surely not least, Test-CsVoicePolicy), are just more interesting than others.

 

So what's so great about the CsVoicePolicy cmdlets? Well, the fact of the matter is that voice policies are where all sorts of cool settings can be found. For example, here are just a few of the settings available in a voice policy:

 

Setting

Description

AllowCallForwarding

If this parameter is set to True, calls can be forwarded. If this parameter is set to False, calls cannot be forwarded.

AllowSimulRing

Simultaneous ring is a feature that allows multiple phones to ring when a single number is dialed. Setting this parameter to True enables this feature. If this parameter is set to False, simultaneous ring cannot be configured for any user to which this policy is assigned.

EnableCallPark

The Call Park application allows a call to be held, or parked, at a certain number within a range of numbers for later retrieval. Setting this parameter to True enables the application. If this parameter is set to False, users assigned to this policy cannot park calls that have been dialed to their phone number.

Default: False

EnableCallTransfer

Determines whether calls can be transferred to another number. If this parameter is set to True, calls can be transferred; if the parameter is set to False, calls cannot be transferred.

EnableDelegation

Call delegation allows a user to answer calls for another user or make calls on the other user’s behalf. For example, a manager can set up call delegation so that all incoming calls ring both the manager’s phone and the phone of an administrator. Setting this parameter to True allows users with this policy to set up call delegation. Setting this parameter to False disables call delegation.

EnableMaliciousCallTracing

Malicious call tracing is a standard that is in place to trace calls that a user designates as malicious. These calls can be traced even if caller ID is blocked. The trace is available only to the proper authorities, not the user. Setting this property to True enables the ability to set a trace on malicious calls.

EnableTeamCall

Team Call allows a user to designate a group of other users whose phones will ring when that user’s number is called. This feature is useful in teams where, for example, anyone from a team can answer incoming calls from customers. Setting this parameter to True enables this feature.

 

See what we mean? If you want to do cool things with Enterprise Voice – allow users to transfer or park calls; allow users to forward calls; all users to have, say, both their office phone and their cell phone ring any time someone calls their work number – well, you're going to need to use voice policies to do that. And if you want to use Windows PowerShell to manage your voice policies (hint: you do) that means using the CsVoicePolicy cmdlets.

 

Note. Incidentally, we didn't even mention PSTN usages, which are required if you want your Enterprise Voice users to be able to make outbound calls using the public switched telephone network (PSTN). PSTN usages are also applied via voice policies. Is there anything that voice policies can't do?!?

 

When you install Microsoft Lync Server 2010, a global voice policy – a global policy that is automatically applied to all your users – is created for you. That's great, but what if some of your users are more equal than others? (Or, at the very least, what if some of your users require different voice policy settings than others?) That's fine; after all, you can use the New-CsVoicePolicy cmdlet to create custom voice policies at the site scope and/or at the per-user scope. For example, this command creates a new per-user voice policy (RestrictedVoicePolicy) that disables call forwarding, simultaneous ringing, and call transfer:

 

New-CsVoicePolicy –Identity RestrictedVoicePolicy – AllowCallForwarding $False –AllowSimulRing $False -EnableCallTransfer $False

 

If you don't want Ken Myer to have those capabilities (call forwarding, simultaneous ringing, and call transfer) then all you have to do is use the Grant-CsVoicePolicy cmdlet to assign Ken the policy RestrictedVoicePolicy:

 

Grant-CsVoicePolicy –Identity "Ken Myer" –PolicyName RestrictedVoicePolicy

 

That's all you have to do. The CsVoicePolicy cmdlets: how could you not love them?

 

Disclaimer. If you're a big fan of some of the other Lync Server cmdlets (say, Get-CsNetworkInterRegionRoute) we should make it clear that we're big fans of those other cmdlets, too; we just find the CsVoicePolicy cmdlets to be especially interesting. It's like ice cream flavors. All ice cream is equally good. But some ice cream is Dankens Chocolate Decadence.