Office 365 远程登录命令
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Office 365 远程登录命令相关的知识,希望对你有一定的参考价值。
以前管理Office365的时候,需要经常登录后台查看用户邮件信息,配置用户邮箱属性等等,下面的脚本可以让管理员快速登录后台。
方法一: #region Online-Session function Online-Session(){ $UserCredential = Get-Credential -Credential [email protected] $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session } #endregion 方法二:(包含方法一的功能,并且可以管理License,我一直在使用这个) #region Online-MsolService function Online-MsolService{ Import-Module MsOnline $cred=Get-Credential -Credential [email protected] Connect-MsolService -Credential $cred -errorAction silentlyContinue -errorvariable er $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell-LiveID -Credential $cred -Authentication Basic -AllowRedirection Import-PSSession $Session -AllowClobber } #endregion
本文出自 “bxing” 博客,请务必保留此出处http://bxing.blog.51cto.com/1677994/1877922
以上是关于Office 365 远程登录命令的主要内容,如果未能解决你的问题,请参考以下文章