Remove-MBSBackup


Removes a single file or a folder from the backup.

Remove-MBSBackup
        -StorageAccount <StorageAccount>
        -File <String>
        [-MasterPassword <SecureString>]
        [<CommonParameters>]

Remove-MBSBackup
        -StorageAccount <StorageAccount>
        -Folder <String>
        [-MasterPassword <SecureString>]
        [<CommonParameters>]

Description

This cmdlet silently removes a specified file or a folder from the MBS backup.


Examples

Example 1: Removes file "test.txt" from the backup on the storage account "FSS"

PS C:\> Remove-MBSBackup -StorageAccount (Get-MBSStorageAccount | where DisplayName -eq "FSS") -File "C:\TestFolder\test.txt"

Example 2: Removes folder "backup" from the backup on the storage account "FSS"

PS C:\> Remove-MBSBackup -StorageAccount (Get-MBSStorageAccount | where DisplayName -eq "FSS") -Folder "C:\TestFolder\Backup"

Example 3: Removes file "test.txt" and folder "backup" from the backup on the storage account "FSS"

PS C:\> Remove-MBSBackup -StorageAccount (Get-MBSStorageAccount | where DisplayName -eq "FSS") -File "C:\TestFolder\test.txt" -Folder "C:\TestFolder\Backup"

Parameters

-StorageAccount

Specify storage account object. Use Get-MBSStorageAccount cmdlet to list storages. Example: (Get-MBSStorageAccount -Name ""AWS S3"")")

Type StorageAccount
Required: true
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-File

Removes specified file from the backup

Type String
Required: true
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-Folder

Removes specified folder from the backup

Type String
Required: true
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

-MasterPassword

Backup agent master password. Use -MasterPassword (ConvertTo-SecureString -string "Your_Password" -AsPlainText -Force)

Type SecureString
Required: false
Position: named
Default value:
Accept pipeline input: false
Accept wildcard characters: false

CommonParameters

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

String

Notes

Author: Ivan Skorin