{"id":186,"date":"2014-07-07T19:06:34","date_gmt":"2014-07-07T19:06:34","guid":{"rendered":"https:\/\/regroove.ca\/stellark\/?p=186"},"modified":"2023-02-24T19:20:46","modified_gmt":"2023-02-24T19:20:46","slug":"powershell-retention-tags-policy","status":"publish","type":"post","link":"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/","title":{"rendered":"PowerShell \u2013 Retention (Tags &amp; Policy)"},"content":{"rendered":"<p style=\"text-align: left\"><em>Create a new Retention Tag<\/em><\/p>\n<p style=\"text-align: left\">New-RetentionPolicyTag -Name 1DAY -Type &#8216;Personal&#8217; -AgeLimitForRetention 1 -RetentionAction &#8216;DeleteAndAllowRecovery&#8217; -RetentionEnabled $true<\/p>\n<p style=\"text-align: left\"><em>Get a List of all Retention Tags<\/em><\/p>\n<p style=\"text-align: left\">Get-RetentionPolicyTag<\/p>\n<p style=\"text-align: left\"><a href=\"https:\/\/regroove.ca\/stellark\/wp-content\/uploads\/sites\/3\/2014\/07\/image6.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" src=\"https:\/\/regroove.ca\/stellark\/wp-content\/uploads\/sites\/3\/2014\/07\/image_thumb5.png\" alt=\"image\" width=\"422\" height=\"211\" border=\"0\"><\/a><\/p>\n<p style=\"text-align: left\">\n<p style=\"text-align: left\"><em>Create a new Retention Policy<\/em><\/p>\n<p style=\"text-align: left\">New-RetentionPolicy &#8220;Company Policy&#8221; -RetentionPolicyTagLinks &#8220;Company Policy-Deleted Items&#8221;,&#8221;Company Policy-Sent Items&#8221;<\/p>\n<p style=\"text-align: left\">\n<p style=\"text-align: left\"><em>Apply a new Retention Policy to ALL users<\/em><\/p>\n<p style=\"text-align: left\">$UserMailboxes = Get-mailbox -Filter {(RecipientTypeDetails -eq &#8216;UserMailbox&#8217;)}<\/p>\n<p style=\"text-align: left\">$UserMailboxes | Set-Mailbox \u2013RetentionPolicy &#8220;Company Retention Policy&#8221;<\/p>\n<p style=\"text-align: left\">\n<p style=\"text-align: left\"><em>Run Managed Folder Assistant to apply new Retention Policy<\/em><\/p>\n<p style=\"text-align: left\">$UserMailboxes = Get-mailbox -Filter {(RecipientTypeDetails -eq &#8216;UserMailbox&#8217;)}<\/p>\n<p style=\"text-align: left\">$UserMailboxes | ForEach {Start-ManagedFolderAssistant $_.Identity}<\/p>\n<p style=\"text-align: left\">\n<p style=\"text-align: left\"><em>Verify Retention Policy is Applied to ALL users<\/em><\/p>\n<p style=\"text-align: left\">Get-Mailbox -ResultSize unlimited | where {$_.name -Notlike &#8216;*DiscoverySearchMailbox*&#8217;} | select Alias,RetentionPolicy<\/p>\n<p style=\"text-align: left\">\n","protected":false},"excerpt":{"rendered":"<p>Create a new Retention Tag New-RetentionPolicyTag -Name 1DAY -Type &#8216;Personal&#8217; -AgeLimitForRetention 1 -RetentionAction &#8216;DeleteAndAllowRecovery&#8217; -RetentionEnabled $true Get a List of all Retention Tags Get-RetentionPolicyTag Create a new Retention Policy New-RetentionPolicy &#8220;Company Policy&#8221; -RetentionPolicyTagLinks &#8220;Company Policy-Deleted Items&#8221;,&#8221;Company Policy-Sent Items&#8221; Apply a new Retention Policy to ALL users $UserMailboxes = Get-mailbox -Filter {(RecipientTypeDetails -eq &#8216;UserMailbox&#8217;)} $UserMailboxes | &hellip; <a href=\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/\"><\/a><\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[68,74],"tags":[173,190,196],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PowerShell \u2013 Retention (Tags &amp; Policy) - Stephanie Kahlam<\/title>\n<meta name=\"description\" content=\"PowerShell - Retention (Tags &amp; Policy)\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PowerShell \u2013 Retention (Tags &amp; Policy) - Stephanie Kahlam\" \/>\n<meta property=\"og:description\" content=\"PowerShell - Retention (Tags &amp; Policy)\" \/>\n<meta property=\"og:url\" content=\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/\" \/>\n<meta property=\"og:site_name\" content=\"Stephanie Kahlam\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-07T19:06:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-24T19:20:46+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/stellark.itgroove.net\/wp-content\/uploads\/sites\/10\/2014\/07\/image_thumb5.png\" \/>\n<meta name=\"author\" content=\"Stephanie Kahlam\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Stephanie Kahlam\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/\",\"url\":\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/\",\"name\":\"PowerShell \u2013 Retention (Tags &amp; Policy) - Stephanie Kahlam\",\"isPartOf\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/regroove.ca\/stellark\/wp-content\/uploads\/sites\/3\/2014\/07\/image_thumb5.png\",\"datePublished\":\"2014-07-07T19:06:34+00:00\",\"dateModified\":\"2023-02-24T19:20:46+00:00\",\"author\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149\"},\"description\":\"PowerShell - Retention (Tags & Policy)\",\"breadcrumb\":{\"@id\":\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/#primaryimage\",\"url\":\"https:\/\/regroove.ca\/stellark\/wp-content\/uploads\/sites\/3\/2014\/07\/image_thumb5.png\",\"contentUrl\":\"https:\/\/regroove.ca\/stellark\/wp-content\/uploads\/sites\/3\/2014\/07\/image_thumb5.png\",\"width\":422,\"height\":211},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Stellark Home\",\"item\":\"https:\/\/regroove.ca\/stellark\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PowerShell \u2013 Retention (Tags &amp; Policy)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/regroove.ca\/stellark\/#website\",\"url\":\"https:\/\/regroove.ca\/stellark\/\",\"name\":\"Stephanie Kahlam\",\"description\":\"Microsoft 365 and SMB.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/regroove.ca\/stellark\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149\",\"name\":\"Stephanie Kahlam\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g\",\"caption\":\"Stephanie Kahlam\"},\"url\":\"https:\/\/regroove.ca\/stellark\/author\/skahlam\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PowerShell \u2013 Retention (Tags &amp; Policy) - Stephanie Kahlam","description":"PowerShell - Retention (Tags & Policy)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/","og_locale":"en_US","og_type":"article","og_title":"PowerShell \u2013 Retention (Tags &amp; Policy) - Stephanie Kahlam","og_description":"PowerShell - Retention (Tags & Policy)","og_url":"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/","og_site_name":"Stephanie Kahlam","article_published_time":"2014-07-07T19:06:34+00:00","article_modified_time":"2023-02-24T19:20:46+00:00","og_image":[{"url":"http:\/\/stellark.itgroove.net\/wp-content\/uploads\/sites\/10\/2014\/07\/image_thumb5.png"}],"author":"Stephanie Kahlam","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Stephanie Kahlam","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/","url":"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/","name":"PowerShell \u2013 Retention (Tags &amp; Policy) - Stephanie Kahlam","isPartOf":{"@id":"https:\/\/regroove.ca\/stellark\/#website"},"primaryImageOfPage":{"@id":"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/#primaryimage"},"image":{"@id":"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/#primaryimage"},"thumbnailUrl":"https:\/\/regroove.ca\/stellark\/wp-content\/uploads\/sites\/3\/2014\/07\/image_thumb5.png","datePublished":"2014-07-07T19:06:34+00:00","dateModified":"2023-02-24T19:20:46+00:00","author":{"@id":"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149"},"description":"PowerShell - Retention (Tags & Policy)","breadcrumb":{"@id":"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/#primaryimage","url":"https:\/\/regroove.ca\/stellark\/wp-content\/uploads\/sites\/3\/2014\/07\/image_thumb5.png","contentUrl":"https:\/\/regroove.ca\/stellark\/wp-content\/uploads\/sites\/3\/2014\/07\/image_thumb5.png","width":422,"height":211},{"@type":"BreadcrumbList","@id":"https:\/\/regroove.ca\/stellark\/2014\/07\/07\/powershell-retention-tags-policy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Stellark Home","item":"https:\/\/regroove.ca\/stellark\/"},{"@type":"ListItem","position":2,"name":"PowerShell \u2013 Retention (Tags &amp; Policy)"}]},{"@type":"WebSite","@id":"https:\/\/regroove.ca\/stellark\/#website","url":"https:\/\/regroove.ca\/stellark\/","name":"Stephanie Kahlam","description":"Microsoft 365 and SMB.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/regroove.ca\/stellark\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/175e89cb69612178b2ac838c0bab6149","name":"Stephanie Kahlam","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/regroove.ca\/stellark\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/398b95e23dc9eaf37a780b86a239b485?s=96&d=mm&r=g","caption":"Stephanie Kahlam"},"url":"https:\/\/regroove.ca\/stellark\/author\/skahlam\/"}]}},"_links":{"self":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts\/186"}],"collection":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":1,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":1458,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/posts\/186\/revisions\/1458"}],"wp:attachment":[{"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/media?parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/categories?post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regroove.ca\/stellark\/wp-json\/wp\/v2\/tags?post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}