Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write-Host "the following credential needs to be entered as <username>@<domain>"
- Write-Host "Press any key to continue ..."
- $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
- $UserCredential = Get-Credential
- $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/?proxymethod=rps -Credential $UserCredential -Authentication Basic -AllowRedirection
- Import-PSSession $session
- Write-Host
- Write-Host .
- Write-Host Remember to close session with: Get-PSSession `| Remove-PSSession
- function prompt {
- Write-Host '[Office365] &'$pwd.ProviderPath `n -NoNewLine
- #Write-Host "Σ" -NoNewLine -ForegroundColor "DarkGray"
- return
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement