15

Hopefully someone can explain me what I'm doing wrong. I'd like to create a shadow copy from command line so I started one with administrative rights and enter this command:

vssadmin create shadow /for=e:

But everything I get is error: invalid command.

When I run vssadmin without parameters then I am given a list of available commands, but create is not in the list.

Why can't I create a shadow copy?

Btw: I'm using Windows 10 Pro (x64)

phuclv
  • 26,555
  • 15
  • 113
  • 235
AlexS
  • 253
  • 1
  • 2
  • 6

1 Answers1

25

VSSAdmin only has the create option on Windows Server as shown here. Instead, you will have to make use of a PowerShell script to create the shadow.

powershell.exe -Command (gwmi -list win32_shadowcopy).Create('E:\','ClientAccessible')

Since this just makes use of the Win32_ShadowCopy class in WMI, you can use other methods to create the shadow. This includes the wmic utility.

wmic shadowcopy call create Volume='E:\'
phuclv
  • 26,555
  • 15
  • 113
  • 235
CConard96
  • 1,279
  • 1
  • 11
  • 12
  • Thanks this looks like what I need. Regrettably I get an error that the initialization failed. There must be something wrong on my system. :/ – AlexS Sep 18 '16 at 13:45
  • 4
    Sorry, my fault: I did not start the command line with administrative rights. Works like a charm! :) – AlexS Sep 18 '16 at 13:47
  • +AlexS I made the same mistake, I feel pretty stupid now.. :D – joonas.fi Aug 20 '18 at 16:22
  • Why there is this limitations? Is it exactly the same to use that script? – Fractale Aug 07 '19 at 08:41
  • wmic shadowcopy can't run in parallel, so if you create multi task schedules with this command, for backup multi volumes at the same time, you will just get one success. – ahdung Nov 25 '22 at 14:56
  • Works well, thanks. Are other operations, e.g. listing, removing, or restoring snapshots, possible through PowerShell, too? – Frederick Nord May 16 '23 at 08:55