Microsoft’s VSS is Windows’ built-in infrastructure for application backups. A native Windows service,VSS facilitates creating a consistent view of application data during the course of a backup. VSS relies on coordination between **VSS requestors, writers and providers*** for quiescence, or “to make quiet,” a disk
volume, so that a backup can be successfully obtained without data corruption
- VSS Provider – OS with it file system, or Hardware Provider
- VSS Writer – VSS Compatible Applications, like Exchange, SQL
- VSS Requestor – Backup Software
Please refer to the following on how to use powershell to perfrom vary vss tasks for better understanding
Enable Shadow Copy
To redirect the shadow copy to be written to M Drive to avoid issues for high I/O and low disk space on C: drive
#Enable Shadows Copy Storage
vssadmin add shadowstorage /for=C: /on=M: /maxsize=10%
You can delete the shadow copies with
vssadmin delete shadowstorage /for=c:
**Create Shadow Copy for M Drive **
vssadmin create shadow /for=M:
List the Shadow Copy created with
vssadmin list shadows
#or
Get-CimInstance -ClassName Win32_ShadowCopy
Contents of shadow copy set ID: {b5cce385-f76e-42db-8910-d845e8589455}
Contained 1 shadow copies at creation time: 6/20/2018 10:08:24 PM
Shadow Copy ID: {e03b41cf-d113-4d3e-a8ff-2edb61816ed2}
Original Volume: (M:)\\?\Volume{548f28a4-0000-0000-0000-100000000000}\
Shadow Copy Volume: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1
Originating Machine: MYLAB-AD01.mylab.aventistech.com
Service Machine: MYLAB-AD01.mylab.aventistech.com
Provider: 'Microsoft Software Shadow Copy provider 1.0'
Type: ClientAccessible
Attributes: Persistent, Client-accessible, No auto release, No writers, Differential
Mount the Shadow Copy Volume
You can access M:\VSS using Windows Explorer once the vss is mounted successfully – however, this is be the READ ONLY copy and you cannot write anything on the mounted folder
$Source=((Get-CimInstance -ClassName Win32_ShadowCopy)[1].DeviceObject + "\")
$Target="M:\VSS"
#Mount / Symbolic link to VSS - Write Protected Volume
cmd /c mklink /D $Target $Source
Remove the Symbolic link
You can remove the symbolic link once you had done
#Remove the Symbolic link
cmd /c rmdir $Target
Remove the Shadow Copy
You can proceed to remove the shadow copy once the symbolic link is removed
#Remove the Shadow Copy silently
vssadmin delete shadows /for=M: /quiet
Other usefuly vss commands for reference
#Lists volumes that are eligible for shadow copies.
vssadmin list volumes
#Lists registered volume shadow copy providers.
vssadmin list providers
#Lists all subscribed volume shadow copy writers on the system
Vssadmin list writers