Problem: This error occurs when you execute the command vssadmin delete shadows /all for shadow copies are to be deleted to recover space. Windows do not allow deleting VSS shadow copy even you are logged on as an administrator. The detail error message as below:
Error: Snapshots were found, but they were outside of your allowed context. Try removing them with the backup application which created them.
Follow below solution steps to resolve vssadmin delete shadows error issue and remove corrupted volume shadow copies VSS.
Table of Contents
- Potential Causes
- Solution 1: Delete Windows Backup Shadow Copies Manually
- Solution 2: Manage Windows Backup Disk Space
- Solution 3: Execute Resize Shadow Storage Command
- Solution 4: Execute Diskshadow Command
- Solution 5: Volume Shadow Copy Deletion via WMIC
- Solution 6: Disable Shadow Copies and Set Maximum
- Solution 7: Delete Backup Catalog
- Solution 8: Third-party Backup Software
Potential Causes
The vssadmin command allows you to manage the System Restore shadow copies, but not other third-party applications or Windows built-in backup system. So when you run the vssadmin command and finds shadow copies that don’t belong to the window, it will skip it and results in this error.
Some defective systems accumulate VSS snapshots that persist in the system. You can enter vssadmin list writers and check for errors. If there are still any writers that are listed as Failed or have an error or any writers’ states are not listed as Stable, you will receive the following error:
Error: Snapshots were found, but they were outside of your allowed context. Try removing them with the backup application which created them.
Solution 1: Delete Windows Backup Shadow Copies Manually
Step 1: Pressing Windows key + R to open a Run box.
Step 2: Type control
and press Enter to open the Classic Control Panel interface.
Step 3: Click on All Control Panel Items > Backup and Restore (Windows 7).
Step 4: Click on Manage space under Backup.
Step 5: Click on View backups under Data file backup.
Step 6: Locate the backups, and click on the Delete button.
Solution 2: Manage Windows Backup Disk Space
Step 1: Pressing Windows key + R to open a Run box.
Step 2: Type control
and press Enter to open the Classic Control Panel interface.
Step 3: Click on All Control Panel Items > Backup and Restore (Windows 7).
Step 4: Click on Manage space under Backup.
Step 5: Click on Change settings under System image.
Step 6: Choose either to Windows manage the spaced used for backup history or keep only the latest image and minimize the spaced used by a backup. If you choose to keep only the latest system image and minimize space used by backup, you will get an estimate of how much space will be free.
Solution 3: Execute Resize Shadow Storage Command
Resizing the storage association may cause shadow copies to disappear.
Step 1: Press Windows key once.
Step 2: Type cmd
in the search box.
Step 3: Choose Run as administrator option to open an elevated command prompt. If you are prompted for an administrator password or for a confirmation, type the password, or select Allow.
Step 4: Type the following command and press Enter: vssadmin resize shadowstorage /for=X: /on=X: /maxsize=401MB
* X: Specifies the storage volume.
Step 5: Once you get a message with success status, type the following command and press Enter to increase the limit once again to the unbounded setting, or an actual limit value if you are using shadow copies for other purposes: vssadmin resize shadowstorage /for=X: /on=X: /maxsize=unbounded
Step 6: Vssadmin will report back the status as below: Successfully resized the shadow copy storage association
Step 7: Type the following command and press Enter to delete the volume shadow copies: vssadmin delete shadows /for=d: /all /quiet
Step 8: Type the following command and press Enter to check the list of shadow copy: vssadmin list shadows
Reference: Microsoft Ignite > Vssadmin resize shadowstorage
Solution 4: Execute Diskshadow Command
Step 1: Press Windows key once.
Step 2: Type cmd
in the search box.
Step 3: Choose Run as administrator option to open an elevated command prompt. If you are prompted for an administrator password or for a confirmation, type the password, or select Allow.
Step 4: Type the following command and press Enter: diskshadow
Step 5: Type the following command and press Enter to list all the shadow copies available together with their ID: list shadows all
Step 6: Type the following command and press Enter if selective deletion is to be performed: delete shadows set {id of shadow to be deleted}
or type the following command and press Enter to delete all shadows: delete shadows all
Step 7: Restart your PC. You can then check the Shadow Copies tab in the Properties of the drive and configure from here.
Reference:
- Microsoft Ignite > Diskshadow
- Error: Snapshots were found, but they were outside of your allowed context RRS feed
Solution 5: Volume Shadow Copy Deletion via WMIC
Step 1: Press Windows key once.
Step 2: Type cmd
in the search box.
Step 3: Choose Run as administrator option to open an elevated command prompt. If you are prompted for an administrator password or for a confirmation, type the password, or select Allow.
Step 4: Type the following command and press Enter: wmic
Step 5: After wmic:root\cli>
appears, type the following command and press Enter: shadowcopy delete
Step 6: You will now be asked Y/N for if you wanted to delete the available shadow copies one by one. Type Y and press Enter after each one.
Solution 6: Disable Shadow Copies and Set Maximum
Step 1: Right-click on the drive and choose Properties from the context menu.
Step 2: Go to Shadow Copies tab.
Step 3: Select the drive and click on the Disable button.
Step 4: Click on Settings button.
Step 5: Select Use limit radio button and set the Maximum size to 320MB.
Solution 7: Delete Backup Catalog
Step 1: Press Windows key once.
Step 2: Type cmd
in the search box.
Step 3: Choose Run as administrator option to open an elevated command prompt. If you are prompted for an administrator password or for a confirmation, type the password, or select Allow.
Step 4: Type the following command and press Enter: wbadmin delete catalog
Reference: Microsoft Ignite > wbadmin delete catalog
Solution 8: Third-party Backup Software
If you are using third-party backup software, you will have to configure it accordingly to free up space and delete those Shadow copies because those copies belong to some other backup application and can only be deleted using that software.