Office 365 远程登录命令

网友投稿 320 2022-10-04

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

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:springboot实现公众号接收回复消息和超过5秒被动回复消息
下一篇:Office 365 ADFS策略设置工具
相关文章

 发表评论

暂时没有评论,来抢沙发吧~