Returns the properties of all the shadow copy providers installed on a computer. Wscript.Echo "Used space: " & objItem.UsedSpace Wscript.Echo "Maximum space: " & objItem.MaxSpace Wscript.Echo "Differential volume: " & objItem.DiffVolume Wscript.Echo "Allocated space: " & objItem.AllocatedSpace Set colItems = objWMIService.ExecQuery("Select * from Win32_ShadowStorage") Retrieves a list of all the shadow copy storage areas on a computer, as well as the properties of each storage area. Wscript.Echo "Volume name: " & objItem.VolumeName Wscript.Echo "Transportable: " & objItem.Transportable Wscript.Echo "Service machine: " & objItem.ServiceMachine Wscript.Echo "Provider ID: " & objItem.ProviderID Wscript.Echo "Persistent: " & objItem.Persistent Wscript.Echo "Originating machine: " & objItem.OriginatingMachine Wscript.Echo "No writers: " & objItem.NoWriters Wscript.Echo "Not surfaced: " & objItem.NotSurfaced Wscript.Echo "No auto release: " & objItem.NoAutoRelease Wscript.Echo "Imported: " & objItem.Imported Wscript.Echo "Hardware assisted: " & objItem.HardwareAssisted Wscript.Echo "Exposed remotely: " & objItem.ExposedRemotely Wscript.Echo "Exposed name: " & objItem.ExposedName Wscript.Echo "Exposed locally: " & objItem.ExposedLocally Wscript.Echo "Differnetial: " & objItem.Differential Wscript.Echo "Device object: " & objItem.DeviceObject Wscript.Echo "Client accessible: " & objItem.ClientAccessible Set colItems = objWMIService.ExecQuery("Select * from Win32_ShadowCopy") Set colItems = objWMIService.ExecQuery("Select * From Win32_ShadowStorage")Įnumerates the properties of all the shadow copies stored on a server. Set colItems = objWMIService.ExecQuery("Select * From Win32_ShadowCopy")ĭeletes all the shadow copy storage areas on a computer. Set objShadowStorage = objWMIService.Get("Win32_ShadowStorage")ĮrrResult = objShadowStorage.Create(VOLUME, DIFFERENTIAL_VOLUME, MAXIMUM_SPACE)ĭeletes all the shadow copies stored on a server. This script reserves 130,023,424 bytes of storage space for the shadow copies. Set objShadowStorage = objWMIService.Get("Win32_ShadowCopy")ĮrrResult = objShadowStorage.Create(VOLUME, CONTEXT, strShadowID)Ĭreates a shadow copy storage area - on drive E - for storing shadow copies of drive C. Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Shadow Copies Scripts Creating a Shadow CopyĮnumerating All Shadow Copies on a ComputerĮnumerating All Shadow Copy Storage Areas on a ComputerĬreates a client-accessible shadow copy of drive C.