先安装SkypeOnlineConnector, https://www.microsoft.com/en-us/download/details.aspx?id=39366


然后运行以下Powershell命令:

#解决mfa不弹出认证页面的问题
#解决lyncdiscover在内网不解释的问题。OverrideAdminDomain
$String = "password"
$username = "tangx@xxxxx.onmicrosoft.com"
$TenantDomain = "xxxx.onmicrosoft.com"
Import-Module SkypeOnlineConnector;$PWord = ConvertTo-SecureString -String $String -AsPlainText -Force;
$Cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $PWord;
$CSSession=New-CsOnlineSession -credential $Cred -OverrideAdminDomain $TenantDomain
Import-PSSession $cssession –AllowClobber


使用Powershell 登陆MS Teams admin Powershell_第1张图片


之后就可以使用命令进行Teams的管理

使用Powershell 登陆MS Teams admin Powershell_第2张图片