VSSADMIN – Windows CMD Command


Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 118

Notice: A non well formed numeric value encountered in /home/future4tech/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 119

Display the current volume shadow copy backups and all installed shadow copy writers and providers.

To enable VSS on a volume. Right-click on the volume and select Properties > Shadow Copies. From here, you can then click Enable to create the first snapshot.

Shadow copies are exposed to PowerShell by a WMI class called Win32_ShadowCopy.

Examples:

Specify that for volume C, volume D is to be used for storage and the maximum size for storage space is to be 900 MB

VSSADMIN add shadowstorage /for=c: /on=d: /maxsize=900mb

Create a shadow copy of volume C

VSSADMIN create shadow /for=c:

Delete the oldest shadow copy of volume C:

VSSADMIN delete shadows /for=c: /oldest

Create a shadow copy with PowerShell [source]:

# get existing shadow copies

$shadow = get-wmiobject win32_shadowcopy

 “There are {0} shadow copies on this sytem” -f $shadow.count “”

# get static method

$class=[WMICLASS]”root\cimv2:win32_shadowcopy”

# create a new shadow copy

“Creating a new shadow copy”

$class.create(“E:\”, “ClientAccessible”) 

# Count again

$shadow = get-wmiobject win32_shadowcopy

 “There are now {0} shadow copies on this sytem” -f $shadow.count

Create a shadow copy with a single line of PowerShell:

(get-wmiobject -list win32_shadowcopy).Create(‘E:\’,’ClientAccessible’)

Create a shadow copy with WMIC:
WMIC shadowcopy call create Volume=’E:\’

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *