使用powershell连接Office 365

网友投稿 332 2022-10-04

使用powershell连接Office 365

先决条件

?安装Azure AD模块的系统要求:Windows 8.1、Windows 8、Windows 7

?软件要求及下载链接

a. Microsoft Online Services 登录助手,下载链接如下:

b. Microsoft Azure Active Directory 模块,下载链接如下:

(3)以管理员身份运行powershell

注:此poershell并非windows powershell,而是用户windows powershell 的windows azure active directory模块,如图

连接到Office365管理中心

Import-Module MSOnline

Connect-MsolService

连接到Exchange online执行如下命令

连接到世纪互联的Office 365

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

连接到全球版Office 365

$UserCredential = Get-Credential

$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "-Credential $credential -Authentication "Basic" -AllowRedirection

Import-PSSession $exchangeSession

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

上一篇:springboot整合mybatis流程详解
下一篇:Office 365 在邮件组中查询用户是否存在
相关文章

 发表评论

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