Managing Shadow Copies with WMIC - Creation, Restoration, and Deletion

Anonymous
2023-09-18T10:26:20+00:00

We are currently using the command mentioned below to create a shadow copy using WMIC.

``

wmic shadowcopy call create volume=<DRIVE>:\

``

Our specific requirement is to restore only particular folders and files from the drive. To accomplish this, we have created a shortcut and employed Robocopy. Are there any optimized approaches for file or folder-specific restoration?

Furthermore, when it comes to deleting the shadow copy, is there a specific age limit or expiry option? If not, will we be able to identify who has created the copy? If not, as we would need the shadow copy ID to achieve this, is there a more secure way to store this information at the OS level without introducing any security threats?

Windows for business | Windows Server | Storage high availability | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-09-19T09:51:58+00:00

    Hi,

    The win32_shadowcopy class has no method to restore folders or files so I think you can keep using robocopy.

    Regarding deleting shadow copies, you can use "vssadmin delete shadows" and there is no age limit or expiry option. The shadow copies are created by the volume shadow copy service which logs on as Local System. To list details of shadow copies, you can use the command "vssadmin list shadows".

    vssadmin | Microsoft Learn

    Best Regards,

    Ian Xue

    0 comments No comments
  2. Anonymous
    2024-04-12T15:27:40+00:00

    vssadmin.exe allows to set maximum size to the shadowcopy area, by volume, and to manually (for instance via cmd or scheduled tasks) delete "oldest" copy by volume as well

    https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/vssadmin

    0 comments No comments