VSSADMIN - CMD


Overview

VSSADMIN is a command-line tool used in Windows operating systems to manage Volume Shadow Copy Service (VSS). The tool allows administrators to display current VSS backups and shadow copies, as well as configure various settings related to volume shadow copies. This command is particularly useful for backup operations, disaster recovery, and system monitoring, ensuring that you can maintain or improve data integrity without interrupting user access to system services.

Syntax

The basic syntax for VSSADMIN follows this format:

vssadmin <Command> [Options]

Where <Command> is one of the subcommands used for specific operations such as managing shadow copies, providers, or storage spaces, and [Options] refers to additional arguments specific to the chosen command.

Options/Flags

Subcommands

  • List Providers: Displays registered VSS providers.
    vssadmin list providers
    
  • List Shadows: Lists existing volume shadow copies.
    vssadmin list shadows
    
  • List ShadowStorage: Displays shadow copy storage associations.
    vssadmin list shadowstorage
    
  • List Volumes: Lists volumes that are eligible for shadow copies.
    vssadmin list volumes
    
  • List Writers: Shows registered VSS writers.
    vssadmin list writers
    
  • Resize ShadowStorage: Resizes the maximum amount of storage space used for shadow copies.
    vssadmin resize shadowstorage /For=<VolumeSpec> /On=<VolumeSpec> /MaxSize=<SizeSpec>
    
  • Delete Shadows: Deletes shadow copies.
    vssadmin delete shadows /Shadow=<ShadowID> [/Quiet]
    
  • Add ShadowStorage: Configures new shadow copy storage associations.
    vssadmin add shadowstorage /For=<VolumeSpec> /On=<VolumeSpec> /MaxSize=<SizeSpec>
    

Flag Descriptions:

  • /For=<VolumeSpec>: Specifies the volume that will be used or is being used for storing the shadow copies.
  • /On=<VolumeSpec>: Indicates the volume on which the shadow storage is located.
  • /MaxSize=<SizeSpec>: Defines the maximum size for the shadow copy storage area.
  • /Quiet: Executes the deletion without displaying messages or prompts.

Examples

  1. Listing all current shadow copies:

    vssadmin list shadows
    

    This command outputs details of all shadow copies available on the system.

  2. Deleting a specific shadow copy:

    vssadmin delete shadows /Shadow={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} /Quiet
    

    Replace the placeholder shadow ID with the actual shadow ID to delete a specific shadow copy quietly.

  3. Resizing the shadow storage space on a volume:

    vssadmin resize shadowstorage /For=C: /On=D: /MaxSize=100GB
    

    This adjusts the shadow storage limit for the C: volume on the D: drive to 100GB.

Common Issues

  • No VSS providers available: This error can occur if VSS services are disabled or malfunctioning. Restarting the “Volume Shadow Copy” service through services.msc can often resolve this issue.
  • Insufficient storage: When expanding shadow storage or creating new shadows, ensure that there is sufficient disk space on the target volume.

Integration

VSSADMIN can be combined with script automation tools like PowerShell, or batch scripting to schedule regular shadow copy checks or cleanup. For example:

@echo off
echo Checking for VSS Provider issues...
vssadmin list providers
echo Done.

This script simply checks and displays VSS provider details.

  • DISKSHADOW: A tool that provides additional features to create and manage shadow copies.
  • WMIC SHADOWCOPY: Allows more simplified shadow copy creation and management through WMIC (Windows Management Instrumentation Command-line).

Further documentation can be found in Microsoft’s official documentation or by inputting vssadmin /? in the command prompt.