DPM

Script to delete all DPM 2019 recovery points

<div> &NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;93 -->&NewLine;<div class&equals;"quads-location quads-ad2522 " id&equals;"quads-ad2522" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine; <h2 class&equals;"wp-block-heading">The Story<&sol;h2><p>I have DPM server deployed and I got couple of Exchange Servers and with about 2 TB of data&period;<&sol;p><div> &NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;93 -->&NewLine;<div class&equals;"quads-location quads-ad2531 " id&equals;"quads-ad2531" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine; <&sol;div><div> &NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;93 -->&NewLine;<div class&equals;"quads-location quads-ad2525 " id&equals;"quads-ad2525" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine; <&sol;div><div> &NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;93 -->&NewLine;<div class&equals;"quads-location quads-ad2530 " id&equals;"quads-ad2530" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine; <&sol;div><figure class&equals;"wp-block-image size-large"><img src&equals;"https&colon;&sol;&sol;www&period;moh10ly&period;com&sol;wp-content&sol;uploads&sol;2021&sol;05&sol;image-1&period;png" alt&equals;"" class&equals;"wp-image-7066"> &NewLine;<div> &NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;93 -->&NewLine;<div class&equals;"quads-location quads-ad2524 " id&equals;"quads-ad2524" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine; <&sol;div> &NewLine;<&sol;figure><p>I scheduled DPM to backup Exchange four days a week&comma; then I used the deduplication command to make a use of non used space&period; however that didn&rsquo&semi;t give me enough space&period;<&sol;p><p>As an alternative I planned to delete the recovery points each start of every month&period; <&sol;p><p>The script provided by Microsoft&rsquo&semi;s article about DPM <strong>here<&sol;strong> doesn&rsquo&semi;t really provide anyhow on how to delete a protection group with multiple recovery points&period;<&sol;p><p>After spending lots of digging I tried to create my own script&period;<&sol;p><h2 class&equals;"wp-block-heading">Caution&colon;<&sol;h2><p>Please use this script with caution as it delete every Protection Group&rsquo&semi;s Recovery Points&period; <&sol;p><p>If you need custom script to delete recovery points for a specific date please don&rsquo&semi;t hesitate to send me an email&period; <&sol;p><div> &NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;93 -->&NewLine;<div class&equals;"quads-location quads-ad2526 " id&equals;"quads-ad2526" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine; <&sol;div><h2 class&equals;"wp-block-heading">Script&colon;<&sol;h2><pre class&equals;"EnlighterJSRAW" data-enlighter-language&equals;"generic" data-enlighter-theme&equals;"" data-enlighter-highlight&equals;"" data-enlighter-linenumbers&equals;"" data-enlighter-lineoffset&equals;"" data-enlighter-title&equals;"" data-enlighter-group&equals;"">&dollar;pgList &equals; Get-ProtectionGroup &dollar;env&colon;COMPUTERNAME&NewLine;&NewLine;ForEach&lpar;&dollar;pg in &dollar;pgList&rpar; &lbrace;&NewLine;&NewLine; &dollar;dsList &equals; Get-Datasource -ProtectionGroup &dollar;pg&NewLine;&NewLine; ForEach&lpar;&dollar;ds in &dollar;dsList&rpar; &lbrace;&NewLine;&NewLine; &dollar;RP &equals; Get-DPMRecoveryPoint -Datasource &dollar;ds&semi; &dollar;RP&NewLine; foreach &lpar;&dollar;P in &dollar;RP&rpar;&lbrace;&NewLine; Remove-DPMRecoveryPoint -RecoveryPoint &dollar;p -Confirm&colon;&dollar;false -forcedeletion&NewLine; &rcub; &rcub;&NewLine;&NewLine;&rcub;<&sol;pre><p>If you think this script has a mistake or can be improved please leave a comment or drop me an email&period;<&sol;p><h2 class&equals;"wp-block-heading">References&colon;<&sol;h2><figure class&equals;"wp-block-embed is-type-link is-provider-chuck-039-s-blog wp-block-embed-chuck-039-s-blog"><div class&equals;"wp-block-embed&lowbar;&lowbar;wrapper">&NewLine;<blockquote class&equals;"wp-embedded-content" data-secret&equals;"UXcXj2Retq"><a href&equals;"https&colon;&sol;&sol;murison&period;wordpress&period;com&sol;2015&sol;01&sol;12&sol;removing-a-dpm-recovery-point&sol;">Removing a DPM recovery&nbsp&semi;point<&sol;a><&sol;blockquote><iframe class&equals;"wp-embedded-content" sandbox&equals;"allow-scripts" security&equals;"restricted" style&equals;"position&colon; absolute&semi; visibility&colon; hidden&semi;" title&equals;"&ldquo&semi;Removing a DPM recovery&nbsp&semi;point&rdquo&semi; &mdash&semi; Chuck's Blog" src&equals;"https&colon;&sol;&sol;murison&period;wordpress&period;com&sol;2015&sol;01&sol;12&sol;removing-a-dpm-recovery-point&sol;embed&sol;&num;&quest;secret&equals;z5V6eHhBk7&num;&quest;secret&equals;UXcXj2Retq" data-secret&equals;"UXcXj2Retq" width&equals;"600" height&equals;"338" frameborder&equals;"0" marginwidth&equals;"0" marginheight&equals;"0" scrolling&equals;"no"><&sol;iframe>&NewLine;<&sol;div><&sol;figure><&sol;div>&NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;93 -->&NewLine;<div class&equals;"quads-location quads-ad2528 " id&equals;"quads-ad2528" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;

moh10ly

Share
Published by
moh10ly

Recent Posts

Reset passwords for Active Directory Users

Reset and manage your Active Directory users' Passwords Active Directory is one of the most…

3 years ago

Finding Exchange Database hidden mailboxes. ​

Finding Exchange Database hidden mailboxes. Story:Maybe you have been in this situation before, trying to…

3 years ago

Setting up ADConnect and PTA (Password auth through) servers agents behind proxy

If you're using a Proxy server in your firewall or in your network and have…

3 years ago

Get Report of Active Directory Locked Accounts and Machine they logged in from

Story:I got some clients  that have reported some of their users being locked out and…

3 years ago

Checking and Providing Full and SendAs delegate access on O365 Exchange Online

Delegate Permissions This is a code that I have wrote recently to check if an…

3 years ago

Retrieving attachments from Exchange mailbox using python

Story: I got a request from a client who constantly gets CVs and have to…

4 years ago

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298