首页 > 系统服务 > 详细

Powershell连接Office 365各组件的方法

时间:2015-07-03 15:26:04      阅读:508      评论:0      收藏:0      [点我收藏+]

参考: http://www.exchangecn.com/office365/20150108_540.html

$pw = ConvertTo-SecureString ‘password‘ -AsPlainText -Force
$creds = New-Object -Typename System.Management.Automation.PSCredential -Argumentlist ‘abc@company.cn‘, $pw

1. Connect to Office 365

Connect-MsolService -Credential $creds

Verify: Get-MsolDomain

断开: Get-PSSession | Remove-PSSession

 

2. Connect to SharePoint

Connect-SPOService -Url https://company-admin.sharepoint.cn -Credential $creds

验证: Get-SPOSite

断开: Disconnect-SPOService

 

3. Connect to Exchange Online

$ExchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell -Credential $creds -Authentication Basic -AllowRedirection

Import-PSSession $ExchangeSession

断开: Remove-PSSession $exchangeSession

 

4. Connect to Lync

$LyncSession = New-CsOnlineSession -Credential $creds

Import-PSSession $LyncSession

断开: Get-PSSession | Remove-PSSession

Powershell连接Office 365各组件的方法

原文:http://www.cnblogs.com/IvanChen/p/4618624.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!