Delete All Shadow Copy Storage Areas

Deletes all the shadow copy storage areas on a computer.

VBScript Code


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * From Win32_ShadowStorage")

For Each objItem in colItems
    objItem.Delete_
Next