Forum Discussion
ThierryBruni
Dec 06, 2021Copper Contributor
Remote connection to Tenant v1.1.6 vs v.2.3.1
Hello guys,
I work on a corporate network and when I used the v1.1.6 Teams module of Powershell I was able to connect to the Tenant I manage with the following lines:
$Domain2Connect = "MyTenant.onmicrosoft.com"
Import-Module MicrosoftTeams
$UserCredential = Get-Credential -Credential $Null
$proxysettings=New-PSSessionOption -ProxyAccessType IEConfig
$session=New-CsOnlineSession –OverrideAdminDomain $Domain2Connect -SessionOption $proxysettings -Credential $UserCredential
Import-PSSession –Session $session -AllowClobber
From the apparition of module v2.0.0, I can connect with :
$cred = get-credential
Connect-MicrosoftTeams -credential $cred
but when I launch the command get-cs-onlineuser I have the following error
The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
I read a lot of documentation, but I am still unable to solve this issue (and so I connect to an other network).
Do anyone have an idea how to solve this ?
Thanks in advance
- Hi!
Try these resolutions
https://stackoverflow.com/questions/65108982/powershell-the-client-cannot-connect-to-the-destination-specified-in-the-reques
Also upgrade the the PowerShell module to the latest version
https://www.powershellgallery.com/packages/MicrosoftTeams/3.0.0
Let me know how you get on.
Moving forward, Cloud Shell is now in Teams Admin Centre which means once configured you will be able to use GUI/CLI side by side 😄
Hope that helps!
Best, Chris
- Hi!
Try these resolutions
https://stackoverflow.com/questions/65108982/powershell-the-client-cannot-connect-to-the-destination-specified-in-the-reques
Also upgrade the the PowerShell module to the latest version
https://www.powershellgallery.com/packages/MicrosoftTeams/3.0.0
Let me know how you get on.
Moving forward, Cloud Shell is now in Teams Admin Centre which means once configured you will be able to use GUI/CLI side by side 😄
Hope that helps!
Best, Chris- ThierryBruniCopper ContributorHello Christopher,
Thank you for your answer.
I am sorry to tell that I still don't find a solution to this "problem". What I can add more in the topic is the fact that I am now totally on v3.0.0 of the MicrosoftTeams Module. But the problem remains the same as with v2.3.
I really think that in my case I miss the "OverrideAdminDomain" parameter from the "New-CsOnlineSession" command.
But thanks a lot for the documentation, it will surely help in the future
Best regards, Thierry- Awesome. I am glad it's worked out and you pinpointed the absence of a command with the install of 3.0.0.
What I will say, in that case is that the solution is to raise for the reintroduction of the command if that's what you want to see: https://feedbackportal.microsoft.com/feedback/forum/ad198462-1c1c-ec11-b6e7-0022481f8472
Best, Chris