先決條件
?安裝Azure AD模塊的系統要求:Windows 8.1、Windows 8、Windows 7
?軟件要求及下載鏈接
a. Microsoft Online Services 登錄助手,下載鏈接如下:
http://www.microsoft.com/zh-cn/download/details.aspx?id=41950
b. Microsoft Azure Active Directory 模塊,下載鏈接如下:
http://go.microsoft.com/fwlink/p/?linkid=236297
(1)運行程序Microsoft Online Services 登錄助手(msoidcli_64),點擊“安裝”
(2)運行Microsoft Azure Active Directory 模塊程序,點擊“Next”
(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 https://partner.outlook.cn/PowerShell-LiveID/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
連接到全球版Office 365
$UserCredential = Get-Credential
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $credential -Authentication "Basic" -AllowRedirection
Import-PSSession $exchangeSession