{"id":291,"date":"2017-03-23T08:35:00","date_gmt":"2017-03-23T14:35:00","guid":{"rendered":"https:\/\/sysadminnightmare.com\/?p=291"},"modified":"2017-03-23T08:35:00","modified_gmt":"2017-03-23T14:35:00","slug":"more-powershell-fun","status":"publish","type":"post","link":"https:\/\/sysadminnightmare.com\/index.php\/2017\/03\/23\/more-powershell-fun\/","title":{"rendered":"More PowerShell Fun"},"content":{"rendered":"<p>Here are some commands I had to use this week. For exporting users Mailbox Items to PST (and the ones that were too big to Yearly PST)<\/p>\n<p><code><br \/>\n# Create PST of users mailbox + By Date - Note - Location must be a UNC Path<br \/>\nNew-MailboxExportRequest -ContentFilter {(Received -lt '03\/1\/2013') -and (Received -gt '03\/01\/2012')} -Mailbox \"User\" -FilePath \"\\\\Location\\pst\\User.pst\"<\/p>\n<p># See mailbox export queue<br \/>\nGet-MailboxExportRequest<\/p>\n<p># why exports are failing with details<br \/>\nGet-MailboxExportRequest -status failed | Get-MailboxExportRequestStatistics -IncludeReport | Format-List > c:\\temp\\report.txt <\/p>\n<p># Clear out completed job queue<br \/>\nGet-MailboxExport Request -Status Completed | Remove-MailboxExportRequest\u200b<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here are some commands I had to use this week. For exporting users Mailbox Items to PST (and the ones that were too big to Yearly PST) # Create PST of users mailbox + By Date &#8211; Note &#8211; Location must be a UNC Path New-MailboxExportRequest -ContentFilter {(Received -lt &#8217;03\/1\/2013&#8242;)&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/sysadminnightmare.com\/index.php\/2017\/03\/23\/more-powershell-fun\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2,4,7],"tags":[],"class_list":["post-291","post","type-post","status-publish","format-standard","hentry","category-admin","category-exchange","category-powershell-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2bgeE-4H","_links":{"self":[{"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/posts\/291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/comments?post=291"}],"version-history":[{"count":2,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/posts\/291\/revisions"}],"predecessor-version":[{"id":293,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/posts\/291\/revisions\/293"}],"wp:attachment":[{"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/media?parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/categories?post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysadminnightmare.com\/index.php\/wp-json\/wp\/v2\/tags?post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}