Tell me about the issue and I’ll help you find the solution you need.
Lync administrators can't connect to Skype for Business Online Remote PowerShell in a Lync hybrid environment
Content provided by Microsoft
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: http://lyncdiscover.contoso.com?Domain=contoso.com
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 contoso.onmicrosoft.com. The PowerShell cmdlet should resemble the following: