SOLVED

Issues with changing MARS Backup agent policy

%3CLINGO-SUB%20id%3D%22lingo-sub-2657254%22%20slang%3D%22en-US%22%3EIssues%20with%20changing%20MARS%20Backup%20agent%20policy%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2657254%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3EWe%20are%20using%20MARS%20backup%20agent%20to%20backup%20our%20user%20machines%20to%20an%20Azure%20Recovery%20Services%20Vault%2C%20and%20use%20PowerShell%20to%20apply%20the%20settings%20and%20backup%20policy%2C%20primarily%20following%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fbackup%2Fbackup-client-automation%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ethis%20Microsoft%20guide.%3C%2FA%3E%3C%2FP%3E%3CP%3EUnfortunately%2C%20I've%20run%20into%20an%20issue%20that%20I'm%20unable%20to%20change%20the%20backup%20schedule%20once%20it%20has%20been%20initially%20applied.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EAccording%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fid-id%2Fpowershell%2Fmodule%2Fmsonlinebackup%2Fremove-obpolicy%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft%20documentation%3C%2FA%3E%2C%20I%20should%20be%20able%20to%20use%20the%20following%20command%20to%20remove%20the%20existing%20policy%2C%20allowing%20me%20to%20apply%20a%20new%20policy%3A%3CBR%20%2F%3E%26gt%3B%20Get-OBPolicy%20%7C%20Remove-OBPolicy%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20this%20command%20only%20seems%20to%20pause%20the%20existing%20policy%20instead%20of%20removing%20it%20%3CA%20href%3D%22https%3A%2F%2Fi.imgur.com%2FhOBY3v9.png%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E(screenshot%20here)%3C%2FA%3E.%20I%20can't%20see%20any%20additional%20switches%20in%20the%20MS%20docs%20for%20Remove-OBPolicy%20to%20change%20the%20behaviour%20from%20pausing%20to%20deleting.%20I%20am%20also%20unable%20to%20overwrite%20the%20existing%20policy%20by%20trying%20to%20set%20a%20new%20one%2C%20as%20it%20says%20I%20need%20to%20delete%20the%20old%20one%20first%2C%20or%20modify%20the%20existing%20one%2C%20and%20I%20can't%20seem%20to%20find%20any%20information%20on%20modifying%20the%20existing%20one%20%3CA%20href%3D%22https%3A%2F%2Fi.imgur.com%2FIVWAu9F.png%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E(screenshot%20here)%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20unable%20to%20edit%20the%20policy%20using%20the%20GUI%20due%20to%20machine%20restrictions%20in%20place%20blocking%20the%20MMC%20plugin%20that%20MARS%20Backup%20agent%20uses.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20suggestions%20on%20why%20the%20PowerShell%20code%20I%20am%20using%20is%20not%20working%20to%20remove%20an%20existing%20policy%2C%20or%20how%20I%20can%20modify%20an%20existing%20policy%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20find%20the%20entire%20script%20that%20I'm%20using%20to%20set%20the%20initial%20policy%20at%20%3CA%20href%3D%22https%3A%2F%2Fpastebin.com%2FP7Swhayr%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ethis%20Pastebin%20link.%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20greatly%20appreciated!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi all,

We are using MARS backup agent to backup our user machines to an Azure Recovery Services Vault, and use PowerShell to apply the settings and backup policy, primarily following this Microsoft guide.

Unfortunately, I've run into an issue that I'm unable to change the backup schedule once it has been initially applied.


According to Microsoft documentation, I should be able to use the following command to remove the existing policy, allowing me to apply a new policy:
> Get-OBPolicy | Remove-OBPolicy

 

However, this command only seems to pause the existing policy instead of removing it (screenshot here). I can't see any additional switches in the MS docs for Remove-OBPolicy to change the behaviour from pausing to deleting. I am also unable to overwrite the existing policy by trying to set a new one, as it says I need to delete the old one first, or modify the existing one, and I can't seem to find any information on modifying the existing one (screenshot here).

 

I am unable to edit the policy using the GUI due to machine restrictions in place blocking the MMC plugin that MARS Backup agent uses.

 

Any suggestions on why the PowerShell code I am using is not working to remove an existing policy, or how I can modify an existing policy?

 

You can find the entire script that I'm using to set the initial policy at this Pastebin link.

 

Any help would be greatly appreciated!

1 Reply
best response confirmed by nitvit610 (Occasional Contributor)
Solution

 

Posted this same question to Reddit and received an answer to my question. Posting here in case anyone else comes across the same problem.

 

Essentially, Remove-OBPolicy will only pause the existing policy unless the -DeleteBackup switch is used (MS doc here).

In my case, I don't think this will work trying to manage the policies for Win10 endpoints in Endpoint Manager due to the -DeleteBackup switch requiring the Azure vault security PIN which is only valid for 5 minutes at a time. 

 

However, I've not found out how to modify an existing policy without removing the previous one.