Office 365 – Force Archive Policy

Problem:

You enable an auto archive policy into Online Archive but it doesn’t seem to want to work

Solution:

 

    • On your local computer, open Windows PowerShell and run the following command.
      $UserCredential = Get-Credential

      In the Windows PowerShell Credential Request dialog box, type the user name and password for your Office 365 global admin account, and then click OK.

    • Run the following command.
      $Session = New-PSSession –ConfigurationName Microsoft.Exchange –ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential –Authentication Basic -AllowRedirection
    • Run the following command.
      Import-PSSession $Session
    • To verify that you’re connected to your Exchange Online organization, run the following command to get a list of all the mailboxes in your organization.
      Get-Mailbox

      Note: For more information or if you have problems connecting to your Exchange Online organization, see Connect to Exchange Online using remote PowerShell.

    • Run the following command to start the Managed Folder Assistant for a specific user mailbox in your organization.
      Start-ManagedFolderAssistant -identity *username*
    • Run the following command to start the Managed Folder Assistant for all mailboxs in your organization.
      $UserMailboxes = Get-Mailbox -Filter {(RecipientTypeDetails -eq 'UserMailbox')} $UserMailboxes | ForEach {Start-ManagedFolderAssistant $_.Identity}