Remove-CsDialPlan
Topic Last Modified: 2012-03-25
Removes the specified dial plan. This cmdlet can also be used to remove the global dial plan. If you remove the global dial plan, however, the dial plan will not actually be removed; instead, the settings will simply be reset to their default values.
Syntax
Remove-CsDialPlan -Identity <XdsIdentity> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]
Detailed Description
This cmdlet removes an existing dial plan (also known as a location profile). Dial plans provide information required to enable Enterprise Voice users to make telephone calls. Dial plans are also used by the Conferencing Attendant application for dial-in conferencing. A dial plan determines such things as which normalization rules are applied and whether a prefix must be dialed for external calls.
Note: Removing a dial plan will also remove any associated normalization rules. If the global dial plan is removed, any associated normalization rules will also be removed, but a default global normalization rule will be created.
Who can run this cmdlet: By default, members of the following groups are authorized to run the Remove-CsDialPlan cmdlet locally: RTCUniversalServerAdmins. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:
Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Remove-CsDialPlan"}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Required |
XdsIdentity |
The unique identifier of the dial plan you want to remove. |
Force |
Optional |
SwitchParameter |
Suppresses any confirmation prompts that would otherwise be displayed before making changes. |
WhatIf |
Optional |
SwitchParameter |
Describes what would happen if you executed the command without actually executing the command. |
Confirm |
Optional |
SwitchParameter |
Prompts you for confirmation before executing the command. |
Input Types
Microsoft.Rtc.Management.WritableConfig.Policy.Voice.LocationProfile object. Remove-CsDialPlan accepts pipelined input of dial plan objects.
Return Types
This cmdlet removes instances of the Microsoft.Rtc.Management.WritableConfig.Policy.Voice.LocationProfile object.
Example
-------------------------- Example 1 --------------------------
Remove-CsDialPlan -Identity RedmondDialPlan
The preceding example uses Remove-CsDialPlan to delete the per-user dial plan with the Identity RedmondDialPlan. Note that when you delete a dial plan, you do not necessarily have to assign a new plan to users who were assigned the now-deleted plan. Instead, those users will use the dial plan assigned to their service or site, or the global plan.
-------------------------- Example 2 --------------------------
Get-CsDialPlan | Where-Object {$_.Description -match "Redmond"} | Remove-CsDialPlan
In Example 2 all the dial plans that include the word Redmond in their description are deleted. To do this, the command first calls Get-CsDialPlan to return a collection of all the dial plans configured for use within the organization. That collection is then piped to the Where-Object cmdlet, which applies a filter that limits the returned data to profiles that include the word Redmond in their description. After that's done, the filtered collection is passed to Remove-CsDialPlan, which removes all the dial plans in the collection.