Teams Remote PowerShell Session
Teams PowerShell Module – versions older than 4.x.x were retired on June 15, 2022 and will no longer work
Please read through the following article: https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-supported-versions
Teams PowerShell Module Installation
To configure Think365 Cloud Voice and enable users for Enterprise Voice, a Teams Remote PowerShell session must first be established.
Disclaimer: The information provided in this article is provided without warrenty and is subject to change by Microsoft. We will make ever effort to update as changes occur, but for additional Microsoft Documentation, please review the following link:
Microsoft Teams PowerShell Overview
PowerShell 5.1 and .NET 4.8 are pre-requisites.
- Test for PowerShell version: 5.1 and 7.2 are both supported. 7.0 and 7.1 are not supported and will fail to function properly.
Get-Host | Select-Object Version
If running Windows 10, you should be automatically running version 5.1.
If running PS from a Lync/Skype Frontend server, you will likely need to install WMF 5.1:
Installing or upgrading Windows PowerShell
- Set the Execution Policy:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
- Install the PowerShellGet module with one of the following commands:
Install-Module PowerShellGet -Force -AllowClobber
Install-Module -Name PowerShellGet -Repository PSGallery -Force
- Install the .NET 4.8 (NET 4.7.2 is acceptable as well)
Microsoft .NET Framework 4.8 offline installer for Windows
- You can install the Teams PowerShell module with one of the following commands, depending on which version you want to use:
- Directly install from PowerShell with the following command:
Install-Module -Name MicrosoftTeams -RequiredVersion "4.7.0"**Optionally** you can run the following command to update to the latest version (Currently this is 4.7.0):
Update-Module -Name MicrosoftTeamsYou can downgrade to the previously installed module by running the following:
Uninstall-Module -Name MicrosoftTeamsTo confirm which version of the PowerShell module you have installed, run the following:
- Open a PowerShell window as administrator and run the following command to import the Teams PowerShell module:
Import-Module -Name MicrosoftTeams
- Restart the Windows PowerShell window
- Run the following command to sign in with your Office 365 administrator account:
Note: The above steps will need to be repeated any time a remote session is required for future administration. To end the session, run: Disconnect-MicrosoftTeams
Note: For installing on a Skype for Business servers, please review the following articled for installation requirements. When migrating from an Onprem environment, it is highly recommended to be on the latest Cumulative Update Feb 2022, but there are additional requirements that are often overlooked.***
Replacing Skype for Business Online, Windows PowerShell module with MicrosoftTeams module in Skype for Business Server 2015
To apply this update, you must have the following installed:
- Microsoft .NET Framework 4.7.2 or a later version (4.8 is supported), either Offline Installer or Web Installer
- PowerShell 5.1
- The current version of the PowerShellGet module (requires the ability to download directly from PSGallery)
Enable a User with Teams PowerShell Module 4.x.x
The following steps are required to enable Think 365 Cloud Voice users.
- Request a new phone number, if required, via a ThinkTel support ticket. firstname.lastname@example.org, https://helpcentre.thinktel.ca/contact-us, 1-866-928-4465) Alternatively, existing customer phone numbers can be ported from other carriers. Note: ThinkTel will require 911 address information before any number can be activated.
- Assign a Teams and Skype for Business Phone Standard license to an active Office 365 user account. Assign a Phone System license E1 or E3 require Phone Standard to be added. E5 licenses include the Phone Standard license.
- Using the Teams Remote PowerShell session, to enable a user for Enterprise Voice you must assign a phone number and voice routing policy using the following commands:
The following command needs to be ran to enable a user for Enterprise Voice:
Set-CsPhoneNumberAssignment -Identity email@example.com -PhoneNumber '+1xxxxxxxxxx' -PhoneNumberType DirectRouting
To assign the Think365 voice routing policy, run the following:
Grant-CsOnlineVoiceRoutingPolicy -Identity firstname.lastname@example.org -PolicyName "ThinkTel"
- Users may already be enabled for Voicemail so this command might not be required:
Set-CsOnlineVoiceMailUserSettings -Identity email@example.com -VoicemailEnabled $true
- Optionally, you can verify a user was assigned the correct parameters with the following command:
Get-CsOnlineUser firstname.lastname@example.org | fl DialPlan, InterpretedUserType, TeamsUpgradeEffectiveMode, HostingProvider, EnterpriseVoiceEnabled, OnPremEnterpriseVoiceEnabled, OnlineVoiceRoutingPolicy, TeamsCallingPolicy, SipAddress, LineUri, AssignedPlan, FeatureTypes, WhenChanged
- If required, enable Audio Conferencing as per: Setup Audio Conferencing
Auto Attendand and Call Queue Resource Accounts must be assigned a free "Microsoft Teams Phone Resource Account" license before assigning a Direct Routing number.
To assign a ThinkTel Direct Routing phone number to a resource account (e.g. Cloud AA):
Set-CsPhoneNumberAssignment -Identity email@example.com -PhoneNumber '+1xxxxxxxxxx' -PhoneNumberType DirectRouting
Optional, to allow the Auto Attendant or Call Queue to route calls to PSTN numbers, apply the following:
Grant-CsOnlineVoiceRoutingPolicy -Identity firstname.lastname@example.org -PolicyName "ThinkTel"
Disable a User with Teams PowerShell Module 4.x.x
The following steps can be used to disable a user’s Phone System functionality:
- Cancel the phone number via a ThinkTel support ticket. email@example.com, https://helpcentre.thinktel.ca/contact-us, 1-866-928-4465 Alternatively, the phone number can be reassigned or reserved.
- Within the Teams Remote PowerShell session, disable the user’s Phone System and Think 365 Cloud Voice functionality with the following two commands:
Grant-CsOnlineVoiceRoutingPolicy -Identity firstname.lastname@example.org -PolicyName $null
Remove-CsPhoneNumberAssignment -Identity email@example.com -RemoveAll
- Remove the user’s Phone Standard license in the Office 365 admin portal.
Additional Teams PowerShell Module Links
To review Microsofts latest release notes on the Teams PowerShell Module, use the following link:
Teams PS Module Release Notes
The output for Get-CsOnlineUser will now vary depending on the version of the Teams PowerShell Module installed, with a number of parameters depricated or removed in the 3.x modules
Clients and Devices
For optimal user experience, it is important to use clients and devices certified for Microsoft Teams.
Desktop Clients are available for Windows (7+) and Mac OSX. Mobile clients are available for iOS, Android and Windows Phone. Download links for all clients can be found here: https://teams.microsoft.com/downloads
Microsoft Teams can also be accessed via a Web client. The URL to access the Web client is as follows: https://teams.microsoft.com
ThinkTel Technical Support
Should it be required, customers can open a ticket with ThinkTel’s support team to troubleshoot issues related to the Think 365 Cloud Voice. ThinkTel support can be reached through the following methods:
- Emailing support at firstname.lastname@example.org. This will generate a ticket with the level 1 support team with the default 4-hour SLA. Tickets are answered during regular business hours of 9am to 9pm EST.
- Create a ticket at https://helpcentre.thinktel.ca/contact-us.
- Call support at +1 (866) 928-4465.
All methods will generate a ticket with the level 1 support team with the default 4-hour SLA. Tickets are answered during regular business hours of 9am to 9pm EST Monday to Friday.