码迷,mamicode.com
首页 > 系统相关 > 详细

【转载】Powershell连接世纪互联Office365

时间:2014-10-15 14:00:30      阅读:683      评论:0      收藏:0      [点我收藏+]

标签:style   http   color   io   os   ar   for   sp   art   

$User = "admin@contoso.com"
$PWord = ConvertTo-SecureString –String "password" –AsPlainText -Force
$Credential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $User, $PWord
Import-Module MSOnline
Connect-MsolService -Credential $Credential
$sessionOption = New-PSSessionOption -SkipRevocationCheck
$ExchangeShell = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://partner.outlook.cn/PowerShell-LiveID?PSVersion=2.0 -Credential $Credential -Authentication Basic -AllowRedirection -SessionOption $sessionOption
$importresults = Import-PSSession $ExchangeShell

by

http://www.smallrascal.cn/smallrascal/article.asp?id=2080

【转载】Powershell连接世纪互联Office365

标签:style   http   color   io   os   ar   for   sp   art   

原文地址:http://www.cnblogs.com/SignalTips/p/4025778.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!