首页 > 代码库 > Office 365 远程登录命令
Office 365 远程登录命令
以前管理Office365的时候,需要经常登录后台查看用户邮件信息,配置用户邮箱属性等等,下面的脚本可以让管理员快速登录后台。
方法一: #region Online-Session function Online-Session(){ $UserCredential = Get-Credential -Credential account@xxx.com $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 account@xxx.com 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 远程登录命令
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。