Get-CsDialPlan
Topic Last Modified: 2012-03-23
Returns information about the dial plans used in your organization.
Syntax
Get-CsDialPlan [-Identity <XdsIdentity>] [-LocalStore <SwitchParameter>]
Get-CsDialPlan [-Filter <String>] [-LocalStore <SwitchParameter>]
Detailed Description
This cmdlet returns information about one or more dial plans (also known as a location profiles) in an organization. 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: You can use Get-CsDialPlan to retrieve specific information about the normalization rules of a dial plan, but if that’s the only dial plan information you need, you can also use the Get-CsVoiceNormalizationRule cmdlet.
Who can run this cmdlet: By default, members of the following groups are authorized to run the Get-CsDialPlan cmdlet locally: RTCUniversalUserAdmins, 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 "Get-CsDialPlan"}
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Identity |
Optional |
XdsIdentity |
The unique identifier designating the scope, and for per-user scope a name, to identify the dial plan you want to retrieve. |
Filter |
Optional |
String |
Performs a wildcard search that allows you to narrow down your results to only dial plans with identities that match the given wildcard string. |
LocalStore |
Optional |
SwitchParameter |
Retrieves the dial plan information from the local replica of the Central Management store, rather than the Central Management store itself. |
Input Types
None.
Return Types
This cmdlet returns instances of the Microsoft.Rtc.Management.WritableConfig.Policy.Voice.LocationProfile object.
Example
-------------------------- Example 1 --------------------------
Get-CsDialPlan
Example 1 returns a collection of all the dial plans configured for use in your organization; this is done by calling Get-CsDialPlan without any additional parameters.
-------------------------- Example 2 --------------------------
Get-CsDialPlan -Identity RedmondDialPlan
In Example 2, the Identity parameter is used to limit the retrieved data to dial plans that have a per-user dial plan with the Identity RedmondDialPlan. Because identities must be unique, this command will return only the specified dial plan.
-------------------------- Example 3 --------------------------
Get-CsDialPlan -Identity site:Redmond
Example 3 is identical to Example 2 except that instead of retrieving a per-user dial plan, we’re retrieving a dial plan assigned to a site. We do that by specifying the value site: followed by the site name (in this case Redmond) of the site we want to retrieve.
-------------------------- Example 4 --------------------------
Get-CsDialPlan -Filter tag:*
This example uses the Filter parameter to return a collection of all the dial plans that have been configured at the per-user scope. (Settings configured at the per-user, or tag, scope can be directly assigned to users and groups.) The wildcard string tag:* instructs the cmdlet to return only those dial plans that have an identity beginning with the string value tag:, which identifies a dial plan as a per-user dial plan.
-------------------------- Example 5 --------------------------
Get-CsDialPlan | Select-Object -ExpandProperty NormalizationRules
This example displays the normalization rules used by the dial plans configured for use in your organization. Because the NormalizationRules property consists of an array of objects, the complete set of normalization rules is typically not displayed on screen. To see all of these rules, this sample command first uses Get-CsDialPlan to retrieve a collection of all the dial plans. That collection is then piped to the Select-Object cmdlet; in turn, the ExpandProperty parameter of Select-Object is used to "expand" the values found in the NormalizationRules property. Expanding the values simply means that all the normalization rules will be listed out individually on the screen, the same output that would be seen if Get-CsVoiceNormalizationRule had been called.
-------------------------- Example 6 --------------------------
Get-CsDialPlan | Where-Object {$_.Description -match "Redmond"}
In Example 6, Get-CsDialPlan and Where-Object are used to retrieve a collection of all the dial plans that include the word Redmond in their description. To do this, the command first uses Get-CsDialPlan to retrieve all the dial plans. That collection is then piped to Where-Object, which applies a filter that limits the returned data to profiles that have the word Redmond somewhere in their Description.
See Also
Other Resources
New-CsDialPlan
Remove-CsDialPlan
Set-CsDialPlan
Grant-CsDialPlan
Test-CsDialPlan
Get-CsVoiceNormalizationRule