Connect to exchange online

Connect to exchange online

Install exchange online management

Install-Module -Name ExchangeOnlineManagement
——————————————-
Import-Module ExchangeOnlineManagement
Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

////////////////////////////////////////////////////////////////////////////
Import-PSSession $Session -DisableNameChecking

More Details: https://docs.microsoft.com/en-us/powershell/exchange/connect-to-exchange-online-protection-powershell?view=exchange-ps

Connect to exchange online powershell with MFA

Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement
Update-Module -Name ExchangeOnlineManagement

Connect-ExchangeOnline -UserPrincipalName sin@pheaktra.com -DelegatedOrganization vmotion363.onmicrosoft.com

Start Archive Folder
——————————————
Get-Mailbox student@vmotion.com.kh | FL RetentionPolicy

Start-ManagedFolderAssistant -Identity “student”

Connect to Exchange Online PowerShell | Microsoft Docs

Leave a Reply

Your email address will not be published.