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

Runs a test to determine the location policy that will be used based on the criteria specified in the parameter values. The location policy contains the settings that will determine whether and how Enhanced 911 (E9-1-1) will be applied. E9-1-1 enables those who answer 911 emergency calls to determine the caller’s geographic location.

Syntax

Test-CsLocationPolicy -TargetFqdn <String> [-Force <SwitchParameter>] [-OutVerboseVariable <String>] [-RegistrarPort <Nullable>] [-Subnet <String>] [-UserSipAddress <String>]
Test-CsLocationPolicy -TargetFqdn <String> -UserCredential <PSCredential> -UserSipAddress <String> [-Force <SwitchParameter>] [-OutVerboseVariable <String>] [-RegistrarPort <Nullable>] [-Subnet <String>]

Parameters

Parameter Required Type Description

TargetFqdn

Required

String

The fully qualified domain name (FQDN) of the pool on which the specified user or subnet is homed. (If no user is specified, the preconfigured or current user will be assumed.)

Subnet

Optional

String

The ID (the IP address) of the subnet for which you want to test the location policy.

RegistrarPort

Optional

Integer

The port ID of the port for which you want to test the location policy.

UserSipAddress

Optional

SIP address

The SIP address of the user whose location policy you want to test. This must be in the format sip:<user id>, for example, sip:kenmyer@litwareinc.com.

UserSipCredential

Optional

PS credential object

An object containing the user ID and password of the user account whose location policy is being tested. A credential object can be retrieved by calling the Windows PowerShell cmdlet Get-Credential, filling in the appropriate information, and saving the output to a variable.

Detailed Description

The location policy is used to apply settings that relate to E9-1-1 functionality and client location. 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 returns information about the location policy that will be used when calls are made from a particular client on a specific pool, subnet, etc.

If a user is not specified in the call to this cmdlet, the currently configured user will be tested. To find the currently configured user, call Get-CsHealthMonitoringConfiguration. To set the configured user, call Set-CsHealthMonitoringConfiguration.

If a location policy was found for the user or subnet, the test will succeed. Information returned by default includes the name of the location policy (if a per-user policy is assigned) and whether the user or subnet is enabled for E9-1-1. Include the Windows PowerShell common parameter Verbose to retrieve additional information about the test.

You can test location policies on users or on subnets. If you run the test against a subnet (by specifying a value for the Subnet parameter), the cmdlet will attempt to resolve the location policy for that subnet. If no location policy is assigned to the subnet, the location policy for the configured user will be retrieved. If the subnet policy is retrieved successfully the output will include a LocationPolicyTagID value beginning with subnet-tagid. If a location policy for the subnet was not found, the LocationPolicyTagID will begin with user-tagid.

Return Types

Test-CsLocationPolicy returns an instance of the Microsoft.Rtc.SyntheticTransactions.TaskOutput object.

Examples

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

Copy Code
Test-CsLocationPolicy -TargetFqdn atl-cs-001.litwareinc.com 

This example determines the location policy of the current user (or currently configured user). The TargetFqdn is required.

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

Copy Code
$cred = Get-Credential "litwareinc\jhaas"

Test-CsLocationPolicy -TargetFqdn atl-cs-001.litwareinc.com -UserCredential $cred -UserSipAddress "sip:jhaas@litwareinc.com"

The first line in Example 2 is a call to the Windows PowerShell Get-Credential cmdlet. This cmdlet will retrieve user credentials and return them as a secure object. The only parameter supplied to this cmdlet is the user ID. Running this cmdlet will open a dialog box that will be prepopulated with the user ID supplied and has a text box that allows you to type in the user password. These user credentials are saved to the variable $cred.

Line 2 calls the Test-CsLocationPolicy cmdlet. Just like in Example 1, we supply the target FQDN. However, in this example rather than using the preconfigured user, we’re going to run the test against the user with the SIP address jhaas@litwareinc.com. We pass that value (with the sip: prefix) to the UserSipAddress parameter, and the credentials for that user (stored in the $cred variable) to the UserCredential parameter.

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

Copy Code
Test-CsLocationPolicy -TargetFqdn atl-cs-001.litwareinc.com -Subnet 172.15.11.0

This example determines the location policy of the subnet with the subnet ID 172.15.11.0. If the subnet is not associated with a location policy, the location policy for the currently configured user will be retrieved.

Note: A location policy is set on a subnet by setting the LocationPolicy parameter of the Set-CsNetworkSite cmdlet to the location policy ID, then setting the NetworkSiteId parameter of the Set-NetworkSubnet cmdlet to the ID of that site. For example:

Copy Code
Set-CsNetworkSite Portland -LocationPolicy Reno
Set-CsNetworkSubnet 175.15.11.0 -NetworkSiteID Portland