MSP360 Products
Remote Deploy: Use Cases
Although an MSP’s job is challenging overall, many tasks are routine. And changing backup plans is a part of this routine. Doing this on a single computer is easy but, when you have a customer with 100+ PCs, changing all the plans might take way too long. However, you can significantly reduce the number of working hours you’re going to spend on it. Try our PowerShell module!
Below, you will see how to make changes to a plan with this module. This guide overviews several most common use cases: adding compression or encryption to a plan and changing the storage destination. To make these modifications in MSP360 Managed Backup Service, you'll need to create a new backup plan for a single file and apply a bulk modification script through this plan. The script will apply changes to your plans and delete the plan that contains this script.
Note, this guide applies to file-level backup plans only.
Let's start.
Create a new plan, backing up any file. Give it a name.
Please note: remember this name, as you will need it later in your scripts.
Schedule it to start every 15 minutes.
In the Pre/Post Actions, paste the script as a single line.
How the Scripts Work
Here, we’ll parse one of the scripts, described below command by command.
cmd /c start powershell -ExecutionPolicy Bypass -command "&{
Starts PowerShell as a separate process with Execution Policy in the Bypass mode.
$PreActionPlanName = 'ChangeStorage';
Stores your plan name in a variable that will be used later. Be careful; the plan name must match the one you’ve set before.
$MasterPassword = ConvertTo-SecureString -string 'Master_Password' -AsPlainText -Force;
Enters our master password (please type it in place of Master_Password).
iex (New-Object System.Net.WebClient).DownloadString('https://git.io/JUSAA'); Install-MSP360Module;
Downloads and installs our PowerShell module.
Get-MBSBackupPlan -PlanType 'File-Level' |
Applies upcoming changes for all the file-level plans.
Edit-MBSBackupPlan -CommonParameterSet -StorageAccountID (Get-MBSStorageAccount -Name "New storage name").ID -MasterPassword $MasterPassword;
Modifies all the plans (=file-level ones) you retrieved in the previous step, setting new storage with the name “New Storage Name” (replace with yours).
Get-MBSBackupPlan | Where {$_.Name -eq $PreActionPlanName} |
Selects your current plan.
Remove-MBSPlan -MasterPassword $MasterPassword}"
Deletes the current plan using the master password.
The scripts described contain all the commands needed, including the script to install the PowerShell module. For each configuration, there are versions without the Master Password and with it.
Enabling Compression
Case
You want to save some storage space but forgot to enable the compression option while creating plans.
Solution
Without Master Password:
cmd /c start powershell -ExecutionPolicy Bypass -command "& {$PreActionPlanName = 'ChangeCompression'; iex (New-Object System.Net.WebClient).DownloadString('https://git.io/JUSAA'); Install-MSP360Module; Get-MBSBackupPlan -PlanType 'File-Level' | Edit-MBSBackupPlan -CommonParameterSet -Compression $true; Get-MBSBackupPlan | Where {$_.Name -eq $PreActionPlanName} | Remove-MBSPlan}"
With Master Password:
cmd /c start powershell -ExecutionPolicy Bypass -command "& {$PreActionPlanName = 'ChangeCompression'; $MasterPassword = ConvertTo-SecureString -string 'Master_Password' -AsPlainText -Force; iex (New-Object System.Net.WebClient).DownloadString('https://git.io/JUSAA'); Install-MSP360Module; Get-MBSBackupPlan -PlanType 'File-Level' | Edit-MBSBackupPlan -CommonParameterSet -Compression $true -MasterPassword $MasterPassword; Get-MBSBackupPlan | Where {$_.Name -eq $PreActionPlanName} | Remove-MBSPlan -MasterPassword $MasterPassword}"
Enabling Encryption
Case
You want to add an additional level of protection to your plans.
Solution
Without Master Password:
cmd /c start powershell -ExecutionPolicy Bypass -command "& {$PreActionPlanName = 'ChangeEncryption'; iex (New-Object System.Net.WebClient).DownloadString('https://git.io/JUSAA'); Install-MSP360Module; Get-MBSBackupPlan -PlanType 'File-Level' | Edit-MBSBackupPlan -CommonParameterSet -EncryptionAlgorithm "AES265" -EncryptionPassword (ConvertTo-SecureString -string 'Your_Password' -AsPlainText -Force); Get-MBSBackupPlan | Where {$_.Name -eq $PreActionPlanName} | Remove-MBSPlan}"
With Master Password:
cmd /c start powershell -ExecutionPolicy Bypass -command "& {$PreActionPlanName = 'ChangeEncryption'; $MasterPassword = ConvertTo-SecureString -string 'Master_Password' -AsPlainText -Force; iex (New-Object System.Net.WebClient).DownloadString('https://git.io/JUSAA'); Install-MSP360Module; Get-MBSBackupPlan -PlanType 'File-Level' | Edit-MBSBackupPlan -CommonParameterSet -EncryptionAlgorithm "AES265" -EncryptionPassword (ConvertTo-SecureString -string 'Your_Password' -AsPlainText -Force) -MasterPassword $MasterPassword; Get-MBSBackupPlan | Where {$_.Name -eq $PreActionPlanName} | Remove-MBSPlan -MasterPassword $MasterPassword}"
Changing Backup Destination
Case
You want to change the backup destination for your plans.
Solution
Without Master Password:
cmd /c start powershell -ExecutionPolicy Bypass -command "& {$PreActionPlanName = 'ChangeStorage'; iex (New-Object System.Net.WebClient).DownloadString('https://git.io/JUSAA'); Install-MSP360Module; Get-MBSBackupPlan -PlanType 'File-Level' | Edit-MBSBackupPlan -CommonParameterSet -StorageAccountID (Get-MBSStorageAccount -Name "New storage name").ID; Get-MBSBackupPlan | Where {$_.Name -eq $PreActionPlanName} | Remove-MBSPlan}"
With Master Password:
cmd /c start powershell -ExecutionPolicy Bypass -command "& {$PreActionPlanName = 'ChangeStorage'; $MasterPassword = ConvertTo-SecureString -string 'Master_Password' -AsPlainText -Force; iex (New-Object System.Net.WebClient).DownloadString('https://git.io/JUSAA'); Install-MSP360Module; Get-MBSBackupPlan -PlanType 'File-Level' | Edit-MBSBackupPlan -CommonParameterSet -StorageAccountID (Get-MBSStorageAccount -Name "New storage name").ID -MasterPassword $MasterPassword; Get-MBSBackupPlan | Where {$_.Name -eq $PreActionPlanName} | Remove-MBSPlan -MasterPassword $MasterPassword}"
As you can see, there is nothing special about utilizing our PowerShell module; it is a simple yet useful tool for bulk plan modifications. Please, refer to this page to get more information about the module, or contact our pre-sales team.