Removes the specified location policy. (Location policies are used with the Enhanced 911 service to enable those who answer 911 calls to determine the caller’s geographic location based on the phone number of the telephone or device used to make the call.)
Syntax
Remove-CsLocationPolicy -Identity <XdsIdentity> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]] |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Required |
XdsIdentity |
The unique identifier of the location policy you want to remove. To remove the global location policy (which simply resets that policy to its default values) use a value of Global. For a policy created at the site scope this value will be in the form site:<site name>, where site name is the name of a site defined in the Microsoft Communications Server 2010 deployment. For example, site:Redmond. For a policy created at the per-user scope this value will simply be the name of the policy, such as Bldg30Floor3Sector1. |
Confirm |
Optional |
SwitchParameter |
Prompts you for confirmation before executing the command. |
Force |
Optional |
SwitchParameter |
Specifying this parameter will bypass any confirmation prompts and the deletion will occur without any warning notice. For example, if a per-user location policy is assigned to one or more users, a confirmation prompt will be displayed before deletion if this parameter is not included in the command. |
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 removes an existing location policy.
In addition to removing site and per-user location policies, this cmdlet can also be used to remove the global location policy. In that case, however, the policy will not actually be removed; instead, the policy settings will simply be reset to their default values.
If this cmdlet is run against a per-user location policy that is assigned to user, you will be prompted to confirm the deletion.
Return Types
This cmdlet does not return a value or object. Instead, the cmdlet removes instances of the Microsoft.Rtc.Management.WriteableConfig.Policy.Location.LocationPolicy object.
Examples
-------------------------- Example 1 --------------------------
Copy Code | |
---|---|
Remove-CsLocationPolicy -Identity Reno |
The command shown in Example 1 uses Remove-CsLocationPolicy to delete the location policy with the Identity Reno. When a per-user policy is removed, users or groups who were assigned that policy will automatically use the policy configured for their site instead. If no policy has been configured for their site then these users and groups will use the global location policy.
-------------------------- Example 2 --------------------------
Copy Code | |
---|---|
Get-CsLocationPolicy | Where-Object {$_.EnhancedEmergencyServicesEnabled -eq $false} | Remove-CsLocationPolicy |
Example 2 deletes all the location policies where the EnhancedEmergencyServicesEnabled property is False. (In other words, it deletes all location policies that don’t enable E9-1-1.) To do this, the command first uses Get-CsLocationPolicy to retrieve all the location policies currently in use in the organization. This collection is then piped to the Where-Object cmdlet; Where-Object then applies a filter that limits the retrieved data to those policies where the EnhancedEmergencyServicesEnabled property is equal to (-eq) False ($False). Finally, this filtered collection is passed to Remove-CsLocationPolicy, which proceeds to delete each policy in the collection.