Powershell to cleanup volume shadow copy from Different volumes (c,d etc) from remote computer

shankar prakash 1 Reputation point
2022-07-20T09:23:27.88+00:00

We have volume shadow copy files in different volumes of remote windows 10 servers. We need a Powershell script to clean up them in each server

Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,916 Reputation points
    2022-07-21T07:38:07.613+00:00

    Hi there,

    There are a few options or commands you can use to delete the shadow copies. Shadow Copies data is stored in a folder called System Volume information which is a hidden system folder.

    vssadmin delete shadows command can be used to delete all shadow copies or specific shadow copies from the volume. Use the /? at the end of the command to list parameters that you can use with this command. To delete all shadow copies using vssadmin delete shadows command, you can use the below command.

    Vssadmin delete shadows /all

    To show / list the different commands, Open Powershell as Administrator or Command prompt as an Administrator and type vssadmin

    -------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer–

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.