Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Skype for Business Online operated by 21Vianet in China will be retired on October 1, 2023. If you haven't upgraded your Skype for Business Online users yet, they will be automatically scheduled for an assisted upgrade. If you want to upgrade your organization to Teams yourself, we strongly recommend that you begin planning your upgrade path today. Remember that a successful upgrade aligns technical and user readiness, so be sure to leverage our upgrade guidance as you navigate your journey to Teams.
Skype for Business Online, excluding the service operated by 21Vianet in China, was retired on July 31, 2021.
This article provides information that helps you diagnose and resolve problems that can occur when you try to create a remote Microsoft PowerShell session that connects to Skype for Business Online. See the following sections:
Import-Module error caused by Windows PowerShell execution policy
Import-Module Error caused by incorrect version of Windows PowerShell
Ability to connect to tenant has been disabled in Skype for Business Online
The maximum number of concurrent shells for this user in Skype for Business Online has been exceeded
Import-Module error caused by Windows PowerShell execution policy
The PowerShell execution policy helps to determine which configuration files can be loaded into the PowerShell console, and which scripts a user can run from that console. At a minimum, you can't import the Skype for Business Online Connector module unless the execution policy has been set to RemoteSigned. If it hasn't, you get the following error message when you attempt to import the module:
Error: Import-Module: File C:\Program Files\Common Files\Microsoft Lync Server 2013\Modules\LyncOnlineConnector\LyncOnlineConnectorStartup.psm1 can't be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170.
Resolution: To resolve this issue, start PowerShell as an administrator, and then run the following command:
Set-ExecutionPolicy RemoteSigned
For details about execution policy, see About Execution Policies.
Import-Module Error caused by incorrect version of Windows PowerShell
The Skype for Business Online Connector module can be run only under Windows PowerShell 3.0. If you try to import the module under a previous version of PowerShell, the import process fails with an error message similar to this one:
Error: Import-Module: The version of the loaded PowerShell is '2.0'. The module 'D:\Program Files\Common Files\Microsoft Lync Server 2013\Modules\LyncOnlineConnector\LyncOnlineConnector.psd1' requires a minimum PowerShell version of '3.0' to execute. Verify the installation of the PowerShell and try again.
Resolution: The only way to fix this problem is to install Windows PowerShell 3.0, which is available from the Microsoft Download Center at https://www.microsoft.com/download/details.aspx?id=34595.
Failed to connect to Live ID Server
There are typically three reasons why your connection attempt might fail with the following error message:
Error: Get-CsWebTicket: Failed to connect live ID servers. Make sure proxy is enabled or machine has network connection to live ID servers.
Resolution: Often this error means that the Microsoft Online Services Sign-in Assistant isn't running. You can verify the status of this service by running the following command from the PowerShell prompt:
Get-Service "msoidsvc"
If the service isn't running, start the service by using this command:
Start-Service "msoidsvc"
If the service is running, you might be encountering problems with the network connection between your computer and the Microsoft Live ID Authentication Server. To check this, open Internet Explorer and navigate to https://login.microsoftonline.com/. Try logging on to Microsoft 365 or Office 365 from there. If you can't, you're probably experiencing network connection issues.
Less commonly, it's possible that the Connection URI for Microsoft Live ID Authentication Server has been configured to the wrong value. If you've already determined that the Sign-In Assistant is running and that you're not experiencing network issues, this configuration might be the problem. In this case, contact Microsoft Support.
Failed to load Live ID module
One of the prerequisites for using PowerShell to manage Skype for Business Online is to install the Microsoft Online Services Sign-in Assistant. If the Sign-in Assistant isn't installed, you receive the following error message when you try to establish a remote session with Skype for Business Online:
- Error: Get-CsWebTicket: Cannot load Live ID module. Make sure correct version of Live ID Sign-in assistant is installed.
Logon failed for the user
When you attempt to make a remote connection to Skype for Business Online, you must supply the user name and password of a valid Skype for Business Online user account. If you don't, sign-in fails along with an error message similar to this one:
Error: Get-CsWebTicket : Sign-in failed for the user 'kenmyer@litwareinc.com'. Create a new PSCredential object, making sure that you have used the correct user name and password.
Resolution: If you think that you're using a valid user account and that you have the correct password, try logging on again. If that fails, use the same credentials and try to sign-in at https://login.microsoftonline.com/. If you can't sign-in there, contact Microsoft Support.
The user doesn't have permission to manage this tenant
You can't make a remote PowerShell connection toSkype for Business Online unless you're a member of the Tenant Administrators group. If you're not, your connection attempt fails, and you receive the following error message:
Error: New-PSSession: [admin.vdomain.com] Processing data from remote server admin.vdomain.com failed with the following error message: The user 'user@foo.com' doesn't have permission to manage this tenant. Permissions can be granted by assigning the user to the appropriate RBAC role. For more information, see the Remote Troubleshooting.
Resolution: If you think that you are, or are supposed to be, a member of the Tenant Administrators group, contact Microsoft Support.
Ability to connect to tenant has been disabled in Skype for Business Online
To use PowerShell to manage Skype for Business Online, the EnableRemotePowerShellAccess property of your tenant PowerShell policy must be set to True
. If it's not, your connection fails, and you receive the following error message:
Error: New-PSSession: [admin.vdomain.com] Processing data from remote server admin.vdomain.com failed with the following error message: The ability to connect to this tenant by using a remote PowerShell session has been disabled. Please contact Lync Help to check Tenant Powershell Policy of this tenant. For more information, see the Remote Troubleshooting.
Resolution: If you see this error message, you'll need to contact Microsoft Support and get remote PowerShell access enabled.
The maximum number of concurrent shells for this user in Skype for Business Online has been exceeded
Each administrator is allowed a maximum of three simultaneous remote connections to Skype for Business Online. If you have three remote PowerShell connections up and running, any attempt to make a fourth simultaneous connection will fail, with the following error message:
Error: New-PSSession: [admin.vdomain.com] Connecting to remote server admin.vdomain.com failed with the following error message: The WS-Management service cannot process the request. The maximum number of concurrent shells for this user has been exceeded. Close existing shells or raise the quota for this user. For more information, see the Remote Troubleshooting.
Resolution: The only way to resolve this issue is to close one or more of the previous connections. When you're finished with a Skype for Business Online session, we recommend that you use the Remove-PSSession cmdlet to end the session. This action helps you prevent this issue.
The maximum number of concurrent shells for this tenant in Skype for Business Online has been exceeded
Although each administrator can have as many as three simultaneous connections to a Skype for Business Online tenant, no single tenant can have more than 20 simultaneous connections. For example, six administrators might each have three open sessions. If a seventh administrator tries to open more than two connections (resulting in a total of 21 simultaneous connections), this attempt fails, with the following error message:
Error: New-PSSession: [admin.vdomain.com] Connecting to remote server admin.vdomain.com failed with the following error message: The WS-Management service can't process the request. The maximum number of concurrent shells for this tenant has been exceeded. Close existing shells or raise the quota for this tenant. For more information, see the Remote Troubleshooting
Resolution: The only way to resolve this issue is to close one or more of the previous connections. When you're finished with a Skype for Business Online session, we recommend that you use the Remove-PSSession cmdlet to terminate that session. This helps you prevent this issue.
Related articles
Set up your computer for skype for business online management using Windows PowerShell