diff --git a/Teams/assign-change-or-remove-a-phone-number-for-a-user.md b/Teams/assign-change-or-remove-a-phone-number-for-a-user.md index e942b4e5af..cf873313ad 100644 --- a/Teams/assign-change-or-remove-a-phone-number-for-a-user.md +++ b/Teams/assign-change-or-remove-a-phone-number-for-a-user.md @@ -47,39 +47,6 @@ To assign a number by using the Teams admin center: [!INCLUDE [assign-phone-numbers-to-users-steps](./includes/assign-phone-numbers-to-users-steps.md)] -To assign numbers by using PowerShell, use the [Set-CsPhoneNumberAssignment](/powershell/module/teams/set-csphonenumberassignment) cmdlet as follows: - -For Calling Plan numbers: - -```PowerShell -Set-CsPhoneNumberAssignment -Identity -PhoneNumber -PhoneNumberType CallingPlan -``` - -For Operator Connect numbers: - -```PowerShell -Set-CsPhoneNumberAssignment -Identity -PhoneNumber -PhoneNumberType OperatorConnect -``` - -For Teams Phone Mobile numbers: - -```PowerShell -Set-CsPhoneNumberAssignment -Identity -PhoneNumber -PhoneNumberType OperatorConnect -``` - -For example: - -```PowerShell -Set-CsPhoneNumberAssignment -Identity john@contoso.com -PhoneNumber "+14255550101" -PhoneNumberType CallingPlan -Set-CsPhoneNumberAssignment -Identity jack@contoso.com -PhoneNumber "+14255550102" -PhoneNumberType OperatorConnect -``` - -> [!NOTE] -> Because of the latency between Microsoft 365 and Teams, it can take up to 24 hours for users to be enabled. If the phone number isn't assigned correctly after 24 hours, see [Phone Number Service Center](https://pstnsd.powerappsportals.com/). - -> [!NOTE] -> When you assign a phone number, the EnterpriseVoiceEnabled flag is automatically set to True. - ## Change a phone number for a user To change a phone number for a user by using the Teams admin center: @@ -123,6 +90,39 @@ To remove a phone number by using the Teams admin center: For a PowerShell example, see [Remove-CsPhoneNumberAssignment](/powershell/module/teams/remove-csphonenumberassignment). +To assign numbers by using PowerShell, use the [Set-CsPhoneNumberAssignment](/powershell/module/teams/set-csphonenumberassignment) cmdlet as follows: + +For Calling Plan numbers: + +```PowerShell +Set-CsPhoneNumberAssignment -Identity -PhoneNumber -PhoneNumberType CallingPlan +``` + +For Operator Connect numbers: + +```PowerShell +Set-CsPhoneNumberAssignment -Identity -PhoneNumber -PhoneNumberType OperatorConnect +``` + +For Teams Phone Mobile numbers: + +```PowerShell +Set-CsPhoneNumberAssignment -Identity -PhoneNumber -PhoneNumberType OperatorConnect +``` + +For example: + +```PowerShell +Set-CsPhoneNumberAssignment -Identity john@contoso.com -PhoneNumber "+14255550101" -PhoneNumberType CallingPlan +Set-CsPhoneNumberAssignment -Identity jack@contoso.com -PhoneNumber "+14255550102" -PhoneNumberType OperatorConnect +``` + +> [!NOTE] +> Because of the latency between Microsoft 365 and Teams, it can take up to 24 hours for users to be enabled. If the phone number isn't assigned correctly after 24 hours, see [Phone Number Service Center](https://pstnsd.powerappsportals.com/). + +> [!NOTE] +> When you assign a phone number, the EnterpriseVoiceEnabled flag is automatically set to True. + ## Related topics [Manage phone numbers for your organization](/microsoftteams/manage-phone-numbers-for-your-organization)