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中的DKIM設置
- 2. 辦公室365 Powershell
- 3. SSO與辦公室365
- 4. 辦公室365 - 郵箱
- 5. 辦公室365 DNS要求
- 6. VSTO加入辦公室365
- 7. 將辦公室加載項部署到辦公室365
- 8. 辦公室365和經典ASP與VB.net SMTP設置
- 9. 免費辦公室365訂閱
- 10. 將ucma 3.0連接到辦公室365
- 11. python django:登錄辦公室365
- 12. 辦公室365 API請求超時
- 13. 辦公室365:組織單位
- 14. 辦公室365 cmdlet的參數錯誤
- 15. 從SharePoint Online中(365辦公室)
- 16. 辦公室365 apis失敗401
- 17. 辦公室365 - 從VS'13和Windows 7
- 18. 自動登錄辦公室365 outlook
- 19. 單點登錄辦公室365展望
- 20. 辦公室辦公室文件在辦公室辦公室文件2007年登錄提示只在產品
- 21. 辦公室2013
- 22. 通過C#從VS2013/VS2015通過Office 365從辦公室365閱讀郵件
- 23. 如何獲得辦公室365內的所有物品onedrive
- 24. 辦公室365在線同步,找不到用戶
- 25. 辦公室365組 - 創建默認的OneNote文檔
- 26. 辦公室365休息Api有問題獲取訪問令牌
- 27. 在辦公室365中自定義單詞絲帶欄
- 28. 辦公室365從GAL隱藏沒有consitent
- 29. 辦公室365應用程序唯一令牌刷新/更新
- 30. 辦公室365加載項更改標題按鈕的文本