Forum Discussion

ThierryBruni's avatar
ThierryBruni
Copper Contributor
Dec 06, 2021
Solved

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

 

Resources