0
A
回答
1
你可以使用这个脚本:
Set-ExecutionPolicy unrestricted
$cred = Get-Credential
$O365 = New-PSSession -ConfigurationName Microsoft.Exchange –ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection
$importcmd = Import-PSSession $O365
$importcmd.ExportedFunctions.Count
或者你可以使用这个脚本 - 这样的事情:
$domain=YOUR_DOMAIN
$userName = "[email protected]$domain.onmicrosoft.com" ($domain change to your domain)
$password = "PASSWORD"
$securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $userName, $securePassword
Connect-MsolService -Credential $credential
0
$Cred = Get-Credential
Import-Module MSOnline
Connect-MsolService -Credential $cred
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection
Import-PSSession $Session
$User = “<[email protected]>”
$Pass = “<password>”
$Cred = New-Object System.Management.Automation.PsCredential($User,(ConvertTo-SecureString $Pass -AsPlainText -Force))
Import-Module MSOnline
Connect-MsolService -Credential $Cred
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection
Import-PSSession $Session
相关问题
- 1. 办公室365 Powershell
- 2. 办公室365 - 邮箱
- 3. VSTO加入办公室365
- 4. 将办公室加载项部署到办公室365
- 5. 办公室365和经典ASP与VB.net SMTP设置
- 6. 单点登录办公室365展望
- 7. 办公室365 apis失败401
- 8. 办公室365:组织单位
- 9. 免费办公室365订阅
- 10. 从SharePoint Online中(365办公室)
- 11. python django:登录办公室365
- 12. 办公室365 - 从VS'13和Windows 7
- 13. 将ucma 3.0连接到办公室365
- 14. 自动登录办公室365 outlook
- 15. 办公室办公室文件在办公室办公室文件2007年登录提示只在产品
- 16. 通过C#从VS2013/VS2015通过Office 365从办公室365阅读邮件
- 17. 如何获得办公室365内的所有物品onedrive
- 18. 在OAuth期间限制办公室365中的资源访问
- 19. AADSTS90093:无法在办公室里获得同意365
- 20. 办公室365 SSO SAML点网的Web应用程序集成
- 21. 办公室365在线同步,找不到用户
- 22. 办公室365服务器端电子邮件扫描器
- 23. 在办公室365中自定义单词丝带栏
- 24. 办公室365交换连接拒绝代理服务器
- 25. 办公室365发送电子邮件(VBA)的解决方案
- 26. 办公室365邮件无法打开笔记链接哪个
- 27. 办公室365从GAL隐藏没有consitent
- 28. 从sharepoint页面调用办公室365认证的web api javascript
- 29. 办公室365 API定期会议不总是返回
- 30. 办公室365的活动目录服务