[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

Assigns an Enhanced 911 (E9-1-1) location policy at the per-user scope. (The per-user scope enables you to assign policies to individual users or groups.) The E9-1-1 service enables those who answer 911 calls to determine the caller’s geographic location.

Syntax

Grant-CsLocationPolicy -Identity <UserIdParameter> [-PolicyName <String>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-PassThru <SwitchParameter>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Identity

Required

UserIdParameter

Indicates the Identity of the user account the policy should be assigned to. User identities can be specified using one of four formats: 1) The user's SIP address; 2) the user's Universal Principal Name; 3) the user's domain name and logon name, in the form domain\logon (e.g., litwareinc\kenmyer); and, 4) the user's Active Directory display name (for example, Ken Myer). Note that the SAMAccountName cannot be used as an identity; that's because these names are not necessarily unique in a forest.

In addition, you can use the asterisk (*) wildcard character when using the Display Name as the user Identity. For example, the Identity "* Smith" would grant the policy to all the users with the last name Smith.

DomainController

Optional

Fqdn

Confirm

Optional

SwitchParameter

Prompts you for confirmation before executing the command.

PassThru

Optional

SwitchParameter

Including this parameter (which does not take a value) displays the user information when the cmdlet completes. Normally there is no output when this cmdlet is run – including this parameter displays user information as output.

PolicyName

Optional

String

The Identity of the location policy to apply to the user.

WhatIf

Optional

SwitchParameter

Describes what would happen if you executed the command without actually executing the command.

Detailed Description

The location policy is used to apply settings that relate to E9-1-1 functionality. The location policy determines whether a user is enabled for Enhanced 911, and if so what the behavior is of an emergency call. For example, you can use the location policy to define what number constitutes an emergency call (911 in the United States), whether corporate security should be automatically notified, how the call should be routed, and so on. This cmdlet grants a location policy to a specific user or group.

IMPORTANT. The location policy behaves differently from other policies in Microsoft Communications Server 2010 in terms of order of scope. For all other policies, if the policy is defined at the per-user scope, the per-user policy is applied. If there is no per-user policy, the site policy is applied. If there is no site policy, the global policy is applied. This isn’t the case for location policies. The scope of the policy that is applied is dependent on the user’s location. If the user is making the emergency call from within a defined location (a mapped site or subnet within the organization), the site-level policy is used (or the global policy if no site policy is defined). This is the functionality even if a per-user policy has been granted to that user. If the user calls from a location that is unknown or unmapped in the organization, the per-user policy will be applied.

Return Types

This cmdlet does not return a value.

Examples

-------------------------- Example 1 --------------------------

Copy Code
Grant-CsLocationPolicy -Identity "Ken Myer" -PolicyName Reno

In Example 1, Grant-CsLocationPolicy is used to assign the Reno location policy to user Ken Myer.

-------------------------- Example 2 --------------------------

Copy Code
Get-CsUser -LDAPFilter "Department=Accounting" | Grant-CsLocationPolicy -PolicyName AccountingArea

In Example 2, the AccountingArea policy is assigned to all the users who are in the Accounting department. To return a collection of all the users in the Accounting department, the Get-CsUser cmdlet is used along with the -LDAPFilter parameter. The query value passed to -LDAPFilter -- "Department=Accounting" -- returns all the users who have an Active Directory Department setting of Accounting. This collection is then passed to Grant-CsLocationPolicy, which proceeds to assign the OffsiteAccounting policy to each user in the collection.

-------------------------- Example 3 --------------------------

Copy Code
Grant-CsLocationPolicy -Identity "Ken Myer" -PolicyName Reno -PassThru | Select-Object DisplayName, LocationPolicy

This example grants the location policy Reno to the user with the Identity (in this case the display name) Ken Myer. In addition, the example includes the parameter PassThru, which will cause the user information for user Ken Myer to be displayed after the location policy has been granted. However, rather than immediately displaying the user information to the console, that information is piped to the Select-Object cmdlet, which will display only the DisplayName and LocationPolicy properties of the user.

One thing to notice with this example is that the newly-granted location policy will appear in the output under LocationPolicy, but it will appear as an Anchor value rather than as a policy name. (An Anchor value is a numeric value automatically assigned to a policy at the time it is created.) To see that the policy name that has been applied, run the command Get-CsUser –Identity "Ken Myer" | Select-Object DisplayName, LocationPolicy.