$UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session foreach($user in Get-Mailbox -RecipientTypeDetails UserMailbox) { $cal = $user.alias+":\Calendar" Set-MailboxFolderPermission -Identity $cal -User Default -AccessRights LimitedDetails }
Set-MailboxAutoReplyConfiguration -Identity ALIAS -AutoReplyState Enabled -InternalMessage "Internal Message" -ExternalMessage "Externam Message"
Get-MigrationUser -BatchId BATCH | where {$_.Status -ne 'Completed'} | Get-MigrationUserStatistics
$UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection Import-PSSession $Session