{"id":4592,"date":"2023-01-27T10:44:30","date_gmt":"2023-01-27T18:44:30","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=4592"},"modified":"2023-02-14T10:54:21","modified_gmt":"2023-02-14T18:54:21","slug":"how-to-enable-online-archive-for-all-users-with-powershell","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=4592","title":{"rendered":"How to Enable Online Archive for All users With PowerShell"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>The In-Place Archive that you get with Exchange Online, provides your users with additional storage space. With PowerShell, we can enable the archive mailboxes quickly for all users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-1-load-the-exchange-online-powershell-module\">Load the Exchange Online PowerShell module<\/h2>\n\n\n\n<p>If the module is already installed, you can typically skip this step and run&nbsp;<strong>Connect-ExchangeOnline<\/strong>&nbsp;without manually loading the module first.<\/p>\n\n\n\n<p>After you&#8217;ve&nbsp;<a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/exchange\/exchange-online-powershell-v2?view=exchange-ps#install-and-maintain-the-exchange-online-powershell-module\">installed the module<\/a>, open a PowerShell window and load the module by running the following command:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>Import-Module ExchangeOnlineManagement<\/em><\/strong><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-2-connect-and-authenticate\">Connect and authenticate<\/h2>\n\n\n\n<p>Connect commands will likely fail if the profile path of the account that you used to connect contains special PowerShell characters. The workaround is to connect using a different account that doesn&#8217;t have special characters in the profile path.<\/p>\n\n\n\n<p>The command that you need to run uses the following syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong><em>Connect-ExchangeOnline -UserPrincipalName &lt;UPN&gt; &#91;-UseRPSSession] &#91;-ExchangeEnvironmentName &lt;Value&gt;] &#91;-ShowBanner:$false] &#91;-DelegatedOrganization &lt;String&gt;] &#91;-PSSessionOption $ProxyOptions]<\/em><\/strong><\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Get a list of users without In-place Archive<\/h2>\n\n\n\n<p>To check if there are users without the archive mailbox, you can run the following cmdlet<\/p>\n\n\n\n<p><em><strong>Get-Mailbox -Filter {ArchiveGuid -Eq &#8220;00000000-0000-0000-0000-000000000000&#8221; -AND RecipientTypeDetails -Eq &#8220;UserMailbox&#8221;}<\/strong><\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Enabling the archive<\/h2>\n\n\n\n<p>You can enable the archive for a single user with the following cmdlet<\/p>\n\n\n\n<p><em><strong>Enable-Mailbox -Identity &#8220;&lt;user>&#8221; -Archive<\/strong><\/em><\/p>\n\n\n\n<p>Or for all users at once with<\/p>\n\n\n\n<p><em><strong>Get-Mailbox -Filter {ArchiveGuid -Eq &#8220;00000000-0000-0000-0000-000000000000&#8221; -AND RecipientTypeDetails -Eq &#8220;UserMailbox&#8221;} | Enable-Mailbox -Archive<\/strong><\/em><\/p>\n\n\n\n<p>Ref: <a href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/exchange\/connect-to-exchange-online-powershell?view=exchange-ps\">Connect to Exchange Online PowerShell | Microsoft Learn<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/microsoft-365\/compliance\/enable-archive-mailboxes?view=o365-worldwide\">https:\/\/learn.microsoft.com\/en-us\/microsoft-365\/compliance\/enable-archive-mailboxes?view=o365-worldwide<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/learn.microsoft.com\/en-us\/exchange\/policy-and-compliance\/in-place-archiving\/manage-archives?view=exchserver-2019\">https:\/\/learn.microsoft.com\/en-us\/exchange\/policy-and-compliance\/in-place-archiving\/manage-archives?view=exchserver-2019<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The In-Place Archive that you get with Exchange Online, provides your users with additional storage space. With PowerShell, we can enable the archive mailboxes quickly for all users. Load the Exchange Online PowerShell module If the module is already installed, you can typically skip this step and run&nbsp;Connect-ExchangeOnline&nbsp;without manually loading the module first. After you&#8217;ve&nbsp;installed <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=4592\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1230,10,18],"tags":[1481,1480],"class_list":["post-4592","post","type-post","status-publish","format-standard","hentry","category-exchange","category-microsoft","category-microsoft-office","tag-enable-exchange-365-online-archive-for-all-users","tag-enable-online-archive-for-all-users"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4592"}],"version-history":[{"count":3,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4592\/revisions"}],"predecessor-version":[{"id":4635,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4592\/revisions\/4635"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}