Lync administrators can't connect to Skype for Business Online Remote PowerShell in a Lync hybrid environment

Applies to: Skype for Business Online


Administrators who have a Lync hybrid deployment may receive the following error message when they try to connect to Skype for Business Online (formerly Lync Online) Remote PowerShell: 
Get-CsPowerShellEndpoint : Unable to query AutoDiscover URL at:


To resolve this issue, run the cmdlet again, but instead specify the OverrideAdminDomain property. Use the default domain that was included with your Office 365 subscription. For example, use The PowerShell cmdlet should resemble the following:
$cssession = New-CsOnlineSession –Credential $cred –OverrideAdminDomain "" 


This issue occurs when the DNS records for AutoDiscover are pointed to the on-premises Lync server.

For more information about the New-CsOnlineSession cmdlet, or about how to manage Skype for Business Online with Skype for Business Online Remote PowerShell, go to the following TechNet website:

Still need help? Go to Microsoft Community.