Windows Shadow Copies
Created: 2018-08-08 03:44:58 | Last modified: 2022-10-06 22:42:59 | By: NovaAccess: Read | Visibility: Public | Views: 438 | Rating: N/A | Tags: windows shadow copies shadowcopies
Commands for listing and deleting shadow copies inside Windows Server/ Windows 7 etc
Commands for listing shadow copies and providers. All commands require the command prompt
#Lists registered Volume Shadow Copy providers. Windows Vista includes Software Shadow Copy Provider 1.0. vssadmin list providers #Lists existing volume shadow copies, the time the shadow copy was created, and its location. vssadmin list shadows
#Example of the listed shadow, highlighted section is the ShadowID for deleting as per the below C:>vssadmin list shadows Contents of shadow copy set ID: {0d55acbc-3e04-4184-8c01-9ca1bf72533d} Contained 3 shadow copies at creation time: 6/04/2019 4:48:23 a.m. Shadow Copy ID: {714cab61-965f-4359-a2a3-865bdd57a740} Original Volume: (E:)\\?\Volume{85bbf311-50e7-11e7-bfed-02007d82000b}\ Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy3 Originating Machine: nze1.win.neowebcloud.com Service Machine: nze1.win.neowebcloud.com Provider: 'Microsoft Software Shadow Copy provider 1.0' Type: ApplicationRollback Attributes: Persistent, No auto release, Differential, Exposed locally, Auto recovered
To delete a shadow copy, you can use either of the following
#Delete a shadow using its ID, you can get the shadow ID by running the above commands vssadmin delete shadows /shadow=THESHADOWID vssadmin delete shadows /shadow={714cab61-965f-4359-a2a3-865bdd57a740} #Delete all shadow copies vssadmin delete shadows /all
The above won't work if a backup application has created the shadows. To delete them you can use DiskShadow
#To delete the shadows diskshadow delete shadows all exit #Confirm the shadows are gone vssadmin list shadows
To set a specific size that shadows can grow to before being deleted where C: is the drive you wish to set and the maxsize is the max size the shadow copies can grow.
# Set as a percentage (e.g. 10%) vssadmin resize shadowstorage /for=C: /on=C: /maxsize=10% # Set as a specific value (e.g. 12GB) vssadmin resize shadowstorage /for=C: /on=C: /maxsize=12GB