# Teams voice administration with PowerShell

Canonical: https://warmtransfer.net/knowledge/teams-powershell-voice-admin

Last verified: 2026-09-25

The MicrosoftTeams PowerShell module provides cmdlets for configuring voice routing, phone number assignments, and user policies in Microsoft Teams[^51][^8]. Only module versions in the 4.x.x series or later are supported, while all earlier versions are fully retired[^56].

## Module Requirements and Connection

The MicrosoftTeams PowerShell module requires Windows PowerShell 5.1 or PowerShell 7.2 or later[^36]. Microsoft recommends installing the module from the PowerShell Gallery using `Install-Module -Name MicrosoftTeams`[^28]. The module should be updated using the same method chosen for installation; when installed through `Install-Module`, it is updated using `Update-Module MicrosoftTeams`[^59]. Updating the module fails if it is already imported into the active session, and Microsoft instructs administrators to close PowerShell and open a new elevated session prior to running the update[^58].

From module 7.8.1-preview, interactive user sign-in on Windows uses Web Account Manager (WAM)[^9]. The `-DisableWAM` parameter provides a temporary workaround for execution contexts such as RunAs or a Task Scheduler task configured to run whether or not the user is logged on[^9].

Application-based authentication using service principals is supported from version 4.7.1-preview in commercial and GCC environments, and from version 5.0.1-preview in GCC High and DoD[^3]. For application-based authentication, Microsoft states that administrators should not configure a 'Skype and Teams Tenant Admin API' permission, as doing so may cause failures[^2]. Session role-based access control (RBAC) is derived from the Entra directory role assigned to the application[^2]. With application-based authentication, all cmdlets are supported except a designated list: the voice-relevant exceptions are `Set-CsOnlineApplicationInstance` across all environments, as well as `Get-CsOnlineApplicationInstance`, `New-CsOnlineApplicationInstance`, and `Sync-CsOnlineApplicationInstance` in GCC High and DoD[^1].

## Phone Number Assignment and Management

`Set-CsPhoneNumberAssignment` assigns a phone number to a user or resource account and automatically sets `EnterpriseVoiceEnabled` to True[^51]. The cmdlet was introduced in module 3.0.0, while the `-Notify` parameter was added in 7.3.0 and alternate number assignment in 7.6.0[^53]. `Set-CsPhoneNumberAssignment` is available only in the commercial, GCC, GCC High, and DoD cloud instances[^43]. 

In its Assignment parameter set, the `-NumberType` parameter is mandatory and accepts `DirectRouting`, `CallingPlan`, or `OperatorConnect`[^49]. The `-TelephoneNumber` parameter accepts E.164 formats (+12065551234) and non-E.164 formats (12065551234), but does not accept a `tel:` prefix[^48]. Direct Routing numbers with extensions can be assigned using the syntax `+1206555000;ext=1234` or `1206555000;ext=1234`[^44]. Non-primary numbers can be designated using `-AssignmentCategory`, which accepts `Private` for an incoming-calls-only private line or `Alternate` for an alternate line[^42].

To remove an emergency location from a phone number, administrators pass the string `'null'` to `-LocationId`, which is supported for Direct Routing numbers and Operator Connect numbers not managed by the Service Desk[^45]. Setting `-ReverseNumberLookup SkipInternalVoip` on a Direct Routing number causes internal calls directed to that number to route across external PSTN connectivity rather than resolving internally via VoIP reverse number lookup[^52]. For bulk number updates, Microsoft documents a pattern using a `foreach` loop over `Get-CsPhoneNumberAssignment` results to call `Set-CsPhoneNumberAssignment` with `-ErrorAction Stop` inside a `Try/Catch` block for each number[^41].

`Set-CsPhoneNumberAssignment` cannot assign a number to an account if the number is defined in on-premises Active Directory and synchronized to Microsoft 365; the value must first be cleared on premises and synchronized[^50]. 

Removing number assignments is handled by `Remove-CsPhoneNumberAssignment`, which automatically sets `EnterpriseVoiceEnabled` to False[^39]. The unassigned number remains in the tenant inventory unless an assignment block is specified[^39]. Starting in module 7.5.0, reassignment blocks can be applied indefinitely using `-AssignmentBlockedForever` or for 1 to 365 days using `-AssignmentBlockedDays`[^37]. All numbers can be removed from a user or resource account at once using `Remove-CsPhoneNumberAssignment -RemoveAll` without specifying individual numbers or types[^40]. From version 4.2.1-preview, `Remove-CsPhoneNumberAssignment` reports failures as exceptions added to `$Error` and obeys `-ErrorAction`, rather than outputting a result object with `Code` and `Message`[^38].

Using `Set-CsUser` for Microsoft Teams users in commercial and GCC environments is deprecated in favor of `Set-CsPhoneNumberAssignment` and `Remove-CsPhoneNumberAssignment`, including for configuring `-EnterpriseVoiceEnabled` and `-OnPremLineURI`[^54]. For GCC High and DoD environments, documentation for `Set-CsUser` still outlines `-LineURI` for assigning Direct Routing numbers and notes that `-OnPremLineURI` is deprecated in favor of `-LineURI`[^55].

## Inventory and User Discovery

`Get-CsPhoneNumberAssignment` returns a maximum of 500 results by default, though `-Top` can increase the page size to 1000[^16]. Working with larger data sets requires manual paging with `-Skip` and `-Top` or asynchronous export through `Export-CsAcquiredPhoneNumber`[^16]. WarmTransfer's reading of the sources is that audit scripts calling `Get-CsPhoneNumberAssignment` without paging or export logic will retrieve at most 500 numbers, resulting in silent undercounting in larger environments without triggering an error[^4]. `Get-CsPhoneNumberAssignment` was introduced in module 4.0.0; the `AssignmentBlockedState` and `AssignmentBlockedUntil` properties were added in 7.5.0, and `SmsActivationState` was added in 7.7.0[^19].

When filtering with `Get-CsPhoneNumberAssignment -CapabilitiesContain` using a comma-separated list, the query returns only numbers that match all listed capabilities rather than any single match[^15]. The `-AssignedPstnTargetId` parameter searches for numbers assigned to a specific user or resource account and accepts a UPN, SIP address, ObjectId, or a Teams shared calling routing policy instance name[^18]. The `NumberSource` property indicates whether a number was assigned directly in Microsoft 365 (`Online`) or synced from on-premises Active Directory (`OnPremises`); this property was introduced in module 5.7.0[^17]. In commercial and GCC environments, tenant-wide number lists can be exported asynchronously using `Export-CsAcquiredPhoneNumber`, which returns an `OrderId` tracked via `Get-CsExportAcquiredPhoneNumberStatus` for status and download links[^13]. Older inventory cmdlets, including `Search-CsOnlineTelephoneNumberInventory` and `Get-CsOnlineTelephoneNumberInventoryCities`, are deprecated, with `New-CsOnlineTelephoneNumberOrder` suggested as a replacement[^12].

`Get-CsOnlineVoiceUser` is deprecated in commercial and GCC environments[^11]. In `Get-CsOnlineUser`, several voice attributes have changed across module releases:[^22][^23][^24][^20][^21]

- The `FeatureTypes` array (containing values such as `PhoneSystem`, `CallingPlan`, `AudioConferencing`, and `VoiceApp`) was introduced in module 3.0.0 to replace dropped attributes like `VoicePolicy`, and can be filtered using `-Contains` starting in 4.0.0[^22].
- Direct Routing numbers are listed under `LineURI` and distinguished from Calling Plan numbers via `FeatureTypes`; `OnPremLineURI` strictly represents values set in on-premises Active Directory[^23].
- Starting in module 7.0.0 across all clouds, `OptionFlags` is no longer populated; administrators must inspect `EnterpriseVoiceEnabled` instead[^24].
- The `DialPlan` attribute is deprecated and no longer populated in any cloud[^20].
- In commercial environments starting in 7.1.1 Preview, the `EffectivePolicyAssignments` attribute displays each policy type's effective assignment and clarifies whether it is direct or group-derived[^21].

Normalization rules can be tested using `Test-CsEffectiveTenantDialPlan`, which applies the rules from a user's effective tenant dial plan to a value passed to `-DialedNumber`, commonly by piping from `Get-CsEffectiveTenantDialPlan -Identity <user>`[^57].

## Policy Assignment and Precedence

Policies can be assigned to batches of up to 5,000 users at a time using `New-CsBatchPolicyAssignmentOperation`, which executes asynchronously and returns an operation ID[^5]. Users must be targeted using their object ID or SIP address; supplying a UPN that does not match the user's SIP address causes the assignment to fail[^6]. Status and individual user failures can be queried using `Get-CsBatchPolicyAssignmentOperation -OperationId` by reviewing the `UserState` property[^7]. Voice policy types supported by batch operations include `OnlineVoiceRoutingPolicy`, `TenantDialPlan`, `TeamsCallingPolicy`, `CallingLineIdentity`, `TeamsCallParkPolicy`, `TeamsEmergencyCallingPolicy`, and `TeamsEmergencyCallRoutingPolicy`[^8].

Policy inheritance follows specific precedence rules:[^26]

| Assignment Level | Behavior and Precedence |
| --- | --- |
| Direct Assignment | Takes precedence over group assignments of the same policy type[^26]. |
| Group Assignment | Resolves conflicts by group ranking where 1 is the highest rank[^26]. Applies only to direct group members[^25]. |
| Global Default | Applies automatically to users who have neither a direct nor a group assignment[^26]. |

Group assignments do not propagate to members of nested groups[^25]. Microsoft recommends group assignments for groups of up to 50,000 users; changes propagate in the background over a duration determined by group size[^27]. Running `Get-CsUserPolicyAssignment -PolicyType <type>` and inspecting the expanded `PolicySource` attribute reveals whether a user's effective policy is `Direct` or inherited from a `Group`[^35].

For voice routing specifically, `Grant-CsVoiceRoutingPolicy` and `Get-CsVoiceRoutingPolicy` are not supported or relevant for Microsoft Teams scenarios; the `Cs*OnlineVoiceRoutingPolicy` cmdlets must be used instead[^10]. Group assignments using `Grant-CsOnlineVoiceRoutingPolicy` with `-Group` and `-Rank` are available from module 4.5.1-preview[^32]. Running `Grant-CsOnlineVoiceRoutingPolicy -Identity <user> -PolicyName $null` clears a per-user policy assignment; the user then falls back to any group-assigned policy, or to the global policy if none applies[^34]. A global default can be established across the tenant for all users without explicit assignments using `Grant-CsOnlineVoiceRoutingPolicy -PolicyName <name> -Global`[^31]. An online voice routing policy assignment alone does not enable PSTN calling through Direct Routing; users must also be enabled for Phone System[^33].

## See also

- See also [Teams voice routing policies and dial plans](https://warmtransfer.net/knowledge/teams-voice-routing).
- See also [Teams Phone Direct Routing and SBC certification](https://warmtransfer.net/knowledge/teams-direct-routing).
- See also [Teams Operator Connect and Azure Communication routing](https://warmtransfer.net/knowledge/teams-operator-connect).
- See also [Microsoft Teams Calling Plans](https://warmtransfer.net/knowledge/teams-calling-plans).
- See also [Microsoft Teams Phone architecture and licensing](https://warmtransfer.net/knowledge/teams-phone-architecture).
- See also [Microsoft Teams shared calling and call delegation](https://warmtransfer.net/knowledge/teams-shared-calling).

## Applicability

Applies to: MicrosoftTeams PowerShell module and Microsoft Teams. Deployments: hybrid and multi-tenant. Sources checked 2026-09-25. The MicrosoftTeams module requires PowerShell version 5.1 or version 7.2 or later[^36]. Only module versions in the 4.x.x series or later are supported[^56]. `Set-CsPhoneNumberAssignment` is restricted to commercial, GCC, GCC High, and DoD environments[^43]. `Export-CsAcquiredPhoneNumber` and the deprecation of `Get-CsOnlineVoiceUser` and `Set-CsUser` apply to commercial and GCC environments[^13][^11][^54]. Direct Routing assignment via `Set-CsUser -LineURI` remains documented specifically for GCC High and DoD environments[^55].

## What remains uncertain

Regarding the role of `-NetworkSiteId` in `Set-CsPhoneNumberAssignment`, sources disagree: in the Assignment parameter set, the reference describes it as the ID of a network site representing a physical venue such as an office, a set of buildings, or a campus, but the second `-NetworkSiteId` entry and the `Get-CsPhoneNumberAssignment` output say the parameter is reserved for internal Microsoft use[^46][^47].

## Sources

[^1]: With application-based authentication all cmdlets are supported except a listed set; the voice-relevant exceptions are Set-CsOnlineApplicationInstance everywhere, and Get, New and Sync-CsOnlineApplicationInstance in GCC High and DoD only. Source: [Application-based authentication in Teams PowerShell Module](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-application-authentication), Cmdlets Supported. Checked 2026-09-25.
[^2]: For application-based authentication, Microsoft says not to configure a 'Skype and Teams Tenant Admin API' permission (doing so may cause failures); session RBAC comes from the Entra directory role assigned to the application. Source: [Application-based authentication in Teams PowerShell Module](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-application-authentication), How does it work?; Setup Application-based authentication, step 2 Note and step 5. Checked 2026-09-25.
[^3]: Application-based (service principal) authentication in the Teams PowerShell module is supported from 4.7.1-preview in commercial and GCC and from 5.0.1-preview in GCC High and DoD. Source: [Application-based authentication in Teams PowerShell Module](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-application-authentication), Opening bullets. Checked 2026-09-25.
[^4]: An audit script that calls Get-CsPhoneNumberAssignment without -Top/-Skip paging or Export-CsAcquiredPhoneNumber will see at most 500 numbers, so in larger tenants it undercounts without raising an error (inferred). Source: [Get-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csphonenumberassignment), Description, final paragraph. Checked 2026-09-25.
[^5]: New-CsBatchPolicyAssignmentOperation assigns or unassigns a policy for up to 5,000 users per batch as an asynchronous operation and returns an operation ID. Source: [New-CsBatchPolicyAssignmentOperation (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-csbatchpolicyassignmentoperation), Description, first and third paragraphs; Parameters, -Identity. Checked 2026-09-25.
[^6]: New-CsBatchPolicyAssignmentOperation identifies users by object ID or SIP address; a user given by a UPN that differs from their SIP address fails policy assignment. Source: [New-CsBatchPolicyAssignmentOperation (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-csbatchpolicyassignmentoperation), Description, second paragraph. Checked 2026-09-25.
[^7]: The status of a batch policy assignment is read with Get-CsBatchPolicyAssignmentOperation -OperationId, and per-user errors are in its UserState property. Source: [Assign policies to users and groups](https://learn.microsoft.com/en-us/microsoftteams/assign-policies-users-and-groups), Assign a policy to a batch of users > Use PowerShell method > Get the status of a batch assignment. Checked 2026-09-25.
[^8]: Voice-related policy types that New-CsBatchPolicyAssignmentOperation supports include OnlineVoiceRoutingPolicy, TenantDialPlan, TeamsCallingPolicy, CallingLineIdentity, TeamsCallParkPolicy, TeamsEmergencyCallingPolicy and TeamsEmergencyCallRoutingPolicy. Source: [New-CsBatchPolicyAssignmentOperation (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-csbatchpolicyassignmentoperation), Description, list of supported policy types (final paragraph). Checked 2026-09-25.
[^9]: From module 7.8.1-preview, interactive user sign-in on Windows uses Web Account Manager (WAM); -DisableWAM is a temporary workaround for contexts such as RunAs or a Task Scheduler job set to run whether or not the user is logged on. Source: [Connect-MicrosoftTeams (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/connect-microsoftteams), Notes, Updates in Teams PowerShell Module version 7.8.1-preview and later; Parameters, -DisableWAM. Checked 2026-09-25.
[^10]: The Grant-CsVoiceRoutingPolicy and Get-CsVoiceRoutingPolicy cmdlets are listed as not supported or relevant for Microsoft Teams, unlike the Cs*OnlineVoiceRoutingPolicy cmdlets. Source: [Teams PowerShell Module - Supported Versions](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-supported-versions), Deprecated cmdlets, list of cmdlets that aren't supported/relevant for Microsoft Teams scenarios. Checked 2026-09-25.
[^11]: Get-CsOnlineVoiceUser is deprecated in commercial and GCC environments. Source: [Teams PowerShell Module - Supported Versions](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-supported-versions), Deprecated cmdlets table, Get-CsOnlineVoiceUser row. Checked 2026-09-25.
[^12]: The older telephone number inventory cmdlets (for example Search-CsOnlineTelephoneNumberInventory and Get-CsOnlineTelephoneNumberInventoryCities) are deprecated, and New-CsOnlineTelephoneNumberOrder is the suggested replacement. Source: [Teams PowerShell Module - Supported Versions](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-supported-versions), Deprecated cmdlets table, Get-CsOnlineTelephoneNumberInventory* row. Checked 2026-09-25.
[^13]: Export-CsAcquiredPhoneNumber exports every number the tenant has acquired as an asynchronous operation that returns an OrderId; Get-CsExportAcquiredPhoneNumberStatus reports the status and the download link. Source: [Export-CsAcquiredPhoneNumber (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/export-csacquiredphonenumber), Description, first paragraph; Notes. Checked 2026-09-25.
[^14]: For GCC High and DoD tenants, the reviewed documentation does not state whether Set-CsPhoneNumberAssignment or Set-CsUser -LineURI is the preferred way to assign Direct Routing numbers (inferred). Source: [Set-CsUser (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csuser), Parameters, -LineURI, compared with Set-CsPhoneNumberAssignment Notes second paragraph. Checked 2026-09-25.
[^15]: When Get-CsPhoneNumberAssignment -CapabilitiesContain is given a comma-separated list, it returns only numbers that have all of the listed capabilities, not any of them. Source: [Get-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csphonenumberassignment), Parameters, -CapabilitiesContain; Example 3. Checked 2026-09-25.
[^16]: Get-CsPhoneNumberAssignment returns at most 500 results by default; -Top raises that to at most 1000, and larger sets must be paged with -Skip and -Top or exported with Export-CsAcquiredPhoneNumber. Source: [Get-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csphonenumberassignment), Description, final paragraph; Parameters, -Top; Example 8. Checked 2026-09-25.
[^17]: The NumberSource output of Get-CsPhoneNumberAssignment is Online for numbers assigned in Microsoft 365 and OnPremises for numbers assigned in on-premises AD and synced; it was introduced in module 5.7.0. Source: [Get-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csphonenumberassignment), Outputs, NumberSource; Notes. Checked 2026-09-25.
[^18]: Get-CsPhoneNumberAssignment -AssignedPstnTargetId finds the number assigned to a user or resource account and accepts a UPN, SIP address, ObjectId or Teams shared calling routing policy instance name. Source: [Get-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csphonenumberassignment), Parameters, -AssignedPstnTargetId; Examples 4, 5 and 9. Checked 2026-09-25.
[^19]: Get-CsPhoneNumberAssignment is available from module 4.0.0; the AssignmentBlockedState and AssignmentBlockedUntil outputs arrived in 7.5.0 and SmsActivationState in 7.7.0. Source: [Get-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csphonenumberassignment), Notes, first paragraph. Checked 2026-09-25.
[^20]: The DialPlan attribute is deprecated and no longer populated in Get-CsOnlineUser output in any cloud. Source: [Get-CsOnlineUser (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineuser), Notes, Updates in Teams PowerShell Module (DialPlan bullet). Checked 2026-09-25.
[^21]: From module 7.1.1 Preview, in commercial environments, Get-CsOnlineUser includes an EffectivePolicyAssignments attribute that shows each policy type's assigned policy and whether the assignment is direct or group-based. Source: [Get-CsOnlineUser (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineuser), Notes, Updates in Teams PowerShell Module verion 7.1.1 Preview and later. Checked 2026-09-25.
[^22]: From module 3.0.0, Get-CsOnlineUser exposes a FeatureTypes array (for example PhoneSystem, CallingPlan, AudioConferencing, VoiceApp) that replaces dropped attributes such as VoicePolicy; from 4.0.0 it can be filtered with -Contains. Source: [Get-CsOnlineUser (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineuser), Notes, Updates in Teams PowerShell Module version 3.0.0 and above > New user attributes; Example 7. Checked 2026-09-25.
[^23]: From module 3.0.0, the Get-CsOnlineUser OnPremLineURI attribute refers only to a LineURI set in on-premises AD; Direct Routing numbers appear in LineURI and are distinguished from Calling Plan numbers by FeatureTypes. Source: [Get-CsOnlineUser (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineuser), Notes, 3.0.0 and above > Attributes that have changed in meaning/format > OnPremLineURI. Checked 2026-09-25.
[^24]: From module 7.0.0, Get-CsOnlineUser no longer populates OptionFlags; EnterpriseVoiceEnabled is the attribute to check instead. Source: [Get-CsOnlineUser (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineuser), Notes, Updates in Teams PowerShell Module version 7.0.0 and later. Checked 2026-09-25.
[^25]: Group policy assignments propagate only to direct members of the group, not to members of nested groups. Source: [Assign policies to users and groups](https://learn.microsoft.com/en-us/microsoftteams/assign-policies-users-and-groups), Assign a policy to a group, sixth paragraph. Checked 2026-09-25.
[^26]: A policy assigned directly to a user takes precedence over any group-assigned policy of the same type; among groups, the assignment with the highest ranking (lowest number, 1 is highest) wins; with neither, the Global (Org-wide default) policy applies. Source: [Assign policies to users and groups](https://learn.microsoft.com/en-us/microsoftteams/assign-policies-users-and-groups), Assign a policy to a group > What you need to know about policy assignment to groups > Precedence rules. Checked 2026-09-25.
[^27]: Group policy assignment is recommended for groups of up to 50,000 users, and propagation to members runs as a background operation whose duration depends on group size. Source: [Assign policies to users and groups](https://learn.microsoft.com/en-us/microsoftteams/assign-policies-users-and-groups), Assign a policy to a group, fourth and fifth paragraphs. Checked 2026-09-25.
[^28]: Microsoft recommends installing the MicrosoftTeams module from the PowerShell Gallery with Install-Module -Name MicrosoftTeams. Source: [Install Microsoft Teams PowerShell](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-install), Requirements (recommendation sentence) and Installing using the PowerShellGallery, step 4. Checked 2026-09-25.
[^29]: As of 2026-09-25, the latest MicrosoftTeams module version on the PowerShell Gallery is 8.0.0, published 2026-09-15. Source: [PowerShell Gallery | MicrosoftTeams](https://www.powershellgallery.com/packages/MicrosoftTeams), Version History table, top row. Checked 2026-09-25.
[^30]: No batch cmdlet for number-to-user assignment comparable to New-CsBatchPolicyAssignmentOperation appears in the reviewed sources; the documented bulk pattern for assignment is a per-number loop (inferred). Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Examples 8 and 10; Related Links. Checked 2026-09-25.
[^31]: Grant-CsOnlineVoiceRoutingPolicy -PolicyName <name> -Global makes that policy the tenant-wide global policy, which applies to all users except those with an explicit assignment. Source: [Grant-CsOnlineVoiceRoutingPolicy (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/grant-csonlinevoiceroutingpolicy), Example 4; Parameters, -Global. Checked 2026-09-25.
[^32]: Grant-CsOnlineVoiceRoutingPolicy supports group assignment with -Group and -Rank (the GrantToGroup syntax) from module 4.5.1-preview. Source: [Grant-CsOnlineVoiceRoutingPolicy (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/grant-csonlinevoiceroutingpolicy), Syntax, GrantToGroup; Example 5; Notes. Checked 2026-09-25.
[^33]: Assigning an online voice routing policy alone does not enable a user to make PSTN calls through Direct Routing; the user must also be enabled for Phone System, among other steps. Source: [Grant-CsOnlineVoiceRoutingPolicy (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/grant-csonlinevoiceroutingpolicy), Description, second paragraph. Checked 2026-09-25.
[^34]: Running Grant-CsOnlineVoiceRoutingPolicy -Identity <user> -PolicyName $null removes the per-user online voice routing policy, leaving the user on the global policy. Source: [Grant-CsOnlineVoiceRoutingPolicy (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/grant-csonlinevoiceroutingpolicy), Example 2; Parameters, -PolicyName. Checked 2026-09-25.
[^35]: Get-CsUserPolicyAssignment -PolicyType <type>, expanding PolicySource, shows whether a user's policy is Direct or inherited from a Group, which explains why a group assignment is not taking effect. Source: [Assign policies to users and groups](https://learn.microsoft.com/en-us/microsoftteams/assign-policies-users-and-groups), Assign a policy to a group > Change the effective policy for a user. Checked 2026-09-25.
[^36]: The MicrosoftTeams PowerShell module requires Windows PowerShell 5.1 or PowerShell 7.2 or later. Source: [Install Microsoft Teams PowerShell](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-install), Requirements, first paragraph. Checked 2026-09-25.
[^37]: Remove-CsPhoneNumberAssignment can block a number from reassignment, indefinitely with -AssignmentBlockedForever or for 1 to 365 days with -AssignmentBlockedDays; both parameters were introduced in module 7.5.0. Source: [Remove-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/remove-csphonenumberassignment), Parameters, -AssignmentBlockedDays and -AssignmentBlockedForever; Notes. Checked 2026-09-25.
[^38]: From module 4.2.1-preview, Remove-CsPhoneNumberAssignment reports failures as exceptions appended to $Error and honours -ErrorAction, instead of returning a result object with Code and Message. Source: [Remove-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/remove-csphonenumberassignment), Description, Note paragraph. Checked 2026-09-25.
[^39]: Unassigning a phone number with Remove-CsPhoneNumberAssignment automatically sets EnterpriseVoiceEnabled to False; the number stays in the tenant unless an assignment block is applied. Source: [Remove-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/remove-csphonenumberassignment), Description, first and second paragraphs. Checked 2026-09-25.
[^40]: Remove-CsPhoneNumberAssignment -RemoveAll unassigns all phone numbers from a user or resource account without naming each number or its type. Source: [Remove-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/remove-csphonenumberassignment), Syntax, RemoveAll; Parameters, -RemoveAll; Example 2. Checked 2026-09-25.
[^41]: Microsoft's documented bulk pattern for number changes is a foreach loop over Get-CsPhoneNumberAssignment results that calls Set-CsPhoneNumberAssignment with -ErrorAction Stop inside Try/Catch for each number. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Examples 7 and 10. Checked 2026-09-25.
[^42]: Set-CsPhoneNumberAssignment -AssignmentCategory assigns a non-primary number: Private for an incoming-calls-only private line, or Alternate for an alternate line. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Parameters, -AssignmentCategory; Examples 12 and 14. Checked 2026-09-25.
[^43]: Set-CsPhoneNumberAssignment is available only in the commercial, GCC, GCC High and DoD cloud instances. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Notes, second paragraph. Checked 2026-09-25.
[^44]: Direct Routing numbers with extensions, in the form +1206555000;ext=1234 or 1206555000;ext=1234, can be assigned with Set-CsPhoneNumberAssignment. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Parameters, -TelephoneNumber, second paragraph; Example 6. Checked 2026-09-25.
[^45]: To remove an emergency location from a phone number, pass the string 'null' to -LocationId; this is supported for Direct Routing numbers and for Operator Connect numbers not managed by the Service Desk. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Parameters, -LocationId, second paragraph; Example 4. Checked 2026-09-25.
[^46]: In the Assignment parameter set, the Set-CsPhoneNumberAssignment reference describes -NetworkSiteId as the ID of a network site that represents a physical venue such as an office, a set of buildings or a campus (disputed). Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Parameters, first -NetworkSiteId entry (Parameter sets: Assignment). Checked 2026-09-25.
[^47]: The second -NetworkSiteId entry in the Set-CsPhoneNumberAssignment reference, and the NetworkSiteId output in Get-CsPhoneNumberAssignment, say the parameter is reserved for internal Microsoft use (disputed). Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Parameters, second -NetworkSiteId entry (Parameter sets: NetworkSiteUpdate, Assignment). Checked 2026-09-25.
[^48]: Set-CsPhoneNumberAssignment -TelephoneNumber accepts E.164 (+12065551234) and non-E.164 (12065551234) formats but not a tel: prefix. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Parameters, -TelephoneNumber. Checked 2026-09-25.
[^49]: In the Assignment parameter set of Set-CsPhoneNumberAssignment, -NumberType is mandatory and accepts DirectRouting, CallingPlan or OperatorConnect. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Parameters, -NumberType. Checked 2026-09-25.
[^50]: Set-CsPhoneNumberAssignment cannot set a number on an account whose phone number is set in on-premises Active Directory and synced to Microsoft 365; the number must first be cleared on premises and the change allowed to sync. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Notes, third paragraph. Checked 2026-09-25.
[^51]: Set-CsPhoneNumberAssignment assigns a phone number to a user or resource account and automatically sets EnterpriseVoiceEnabled to True. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Description, first paragraph. Checked 2026-09-25.
[^52]: Setting -ReverseNumberLookup SkipInternalVoip on a Direct Routing number makes internal calls to that number go out through external PSTN connectivity instead of internal VoIP via reverse number lookup. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Parameters, -ReverseNumberLookup; Example 11. Checked 2026-09-25.
[^53]: Set-CsPhoneNumberAssignment is available from module 3.0.0; the -Notify parameter was added in 7.3.0 and alternate number assignment in 7.6.0. Source: [Set-CsPhoneNumberAssignment (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csphonenumberassignment), Notes, first paragraph. Checked 2026-09-25.
[^54]: Using Set-CsUser for Microsoft Teams users in commercial and GCC clouds is deprecated in favour of Set-CsPhoneNumberAssignment and Remove-CsPhoneNumberAssignment, including its -EnterpriseVoiceEnabled and -OnPremLineURI parameters. Source: [Set-CsUser (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csuser), Description, Note; Parameters, -EnterpriseVoiceEnabled and -OnPremLineURI notes. Checked 2026-09-25.
[^55]: The Set-CsUser reference still documents -LineURI for assigning Direct Routing numbers to Teams users in GCC High and DoD, and says -OnPremLineURI is deprecated there in favour of -LineURI. Source: [Set-CsUser (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/set-csuser), Parameters, -LineURI first paragraph; -OnPremLineURI second Note. Checked 2026-09-25.
[^56]: Only Teams PowerShell Module versions in the 4.x.x series or later are supported; all earlier versions are fully retired. Source: [Teams PowerShell Module - Supported Versions](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-supported-versions), Opening paragraph. Checked 2026-09-25.
[^57]: Test-CsEffectiveTenantDialPlan normalizes a dialed number using the normalization rules of a user's effective tenant dial plan, typically by piping Get-CsEffectiveTenantDialPlan -Identity <user> into it with -DialedNumber. Source: [Test-CsEffectiveTenantDialPlan (MicrosoftTeams)](https://learn.microsoft.com/en-us/powershell/module/microsoftteams/test-cseffectivetenantdialplan), Description; Examples 1 and 2. Checked 2026-09-25.
[^58]: Updating the module fails if it is already imported into the current PowerShell session; Microsoft says to close PowerShell and open a new elevated session first. Source: [Install Microsoft Teams PowerShell](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-install), Update Teams PowerShell Module, Warning box. Checked 2026-09-25.
[^59]: The module should be updated with the same method used to install it; a module installed with Install-Module is updated with Update-Module MicrosoftTeams. Source: [Install Microsoft Teams PowerShell](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-install), Update Teams PowerShell Module. Checked 2026-09-25.
[^60]: Module 8.0.0 has a breaking change that makes the RecordingEnabled, TranscriptionEnabled and AgentViewPermission parameters mandatory on New-CsAutoRecordingTemplate. Source: [PowerShell Gallery | MicrosoftTeams 8.0.0](https://www.powershellgallery.com/packages/MicrosoftTeams/8.0.0), Release Notes block, [BREAKING CHANGE] line. Checked 2026-09-25.
