Windows Shadow Copy is a feature in Windows that allows users to create point-in-time snapshots of their data. These snapshots, also known as shadow copies, can be used to restore files and folders in the event of data loss or corruption. Shadow copies are especially useful in scenarios where you need to recover data that was lost or overwritten due to accidental deletion or a software bug.
How Windows Shadow Copy Works:
Windows Shadow Copy works by periodically creating snapshots of your data, either on a schedule or in response to specific events, such as the installation of a new software update. When a snapshot is created, Windows records the state of your data at that moment in time. If you need to recover data from a snapshot, you can simply browse to the snapshot and select the files or folders you need to restore.
Enabling and Disabling Windows Shadow Copy:
Windows Shadow Copy is enabled by default on most Windows systems, but you can check if it’s enabled on your system by using the following PowerShell command:
(Get-ScheduledTask).TaskName | Sort-Object -Descending | Select-String "ShadowCopyVolume"
If the command returns a result, then Windows Shadow Copy is enabled on your system. If it does not return a result, then it is not enabled.
You can enable or disable Windows Shadow Copy by using the following steps:
- Open Control Panel
- Click on System and Security
- Click on System
- Click on System Protection
- Select the drive that you want to configure
- Click on Configure
- Choose either Turn on system protection or Turn off system protection
Once you enable it at the advanced system settings level, you will have access to Enable Shadow Copy option by right-clicking the drive.
Benefits of Windows Shadow Copy:
There are several benefits to using Windows Shadow Copy, including:
- Easy Data Recovery: With Windows Shadow Copy, you can easily recover data that was lost or corrupted due to accidental deletion or software bugs.
- Point-in-Time Snapshots: Windows Shadow Copy creates snapshots of your data at specific points in time, making it easy to find and restore the version of a file or folder that you need.
- No Additional Software Required: Windows Shadow Copy is built into Windows, so you don’t need to install any additional software to use it.
- Automated Snapshot Creation: Windows Shadow Copy can be configured to create snapshots automatically on a schedule, or in response to specific events, such as the installation of a software update.
Listing All Volume Shadow Copies:
The first command we will look at is the “vssadmin info” command. This command lists all the volume shadow copies available in the system. The syntax of the command is:
vssadmin info
This command will return a list of all the volume shadow copies, along with information such as the volume name, shadow copy ID, and creation time.
Listing VSC Writers:
The second command, “vssadmin list writers,” lists all the volume shadow copy writers in the system. The syntax of the command is:
vssadmin list writers
This command will return a list of all the volume shadow copy writers, along with information such as the writer name, state, and last error.
Other VSSAdmin Commands:
Here are some additional vssadmin commands that you can use to manage volume shadow copies:
vssadmin create shadow /for=<volume_letter>
This command creates a volume shadow copy for the specified volume.
vssadmin delete shadows /shadow=<shadow_copy_ID>
This command deletes the specified volume shadow copy.
vssadmin resize shadowstorage /for=<volume_letter> /on=<volume_letter> /maxsize=<size_in_GB>
This command resizes the shadow copy storage for the specified volume.
Windows Shadow Copy is a powerful and easy-to-use feature that allows you to create point-in-time snapshots of your data. Whether you need to recover data that was lost or corrupted, or simply need to revert to an earlier version of a file or folder, Windows Shadow Copy makes it easy to do so. To check if Windows Shadow Copy is enabled on your system, simply run the PowerShell command described in this article.