Share via


PowerShell to get the total space taken by all VSS Shadowcopies

Question

Thursday, January 20, 2011 1:14 PM

Hello,

I have written the following powershell scipt

$colItems = (get-childitem "C:\Program Files\Microsoft DPM\dpm\volumes\shadowcopy" -recurse | Measure-Object -property length -sum)

The output which I see is

Count    : 324
Average  :
Sum      : 1286100013756
Maximum  :
Minimum  :
Property : length

 

where as when I go into the disk manager what I see is

 

From the screen above the total size is 86MB

So which is the right number?

My objective is to find out the total number of disk space being consumed by the VSS snapshots taken by Microsoft Data Protection Manager Server

All replies (2)

Friday, January 21, 2011 7:06 AM ✅Answered

Hi,

 

To check and view existing used, allocated and maximum shadow copy storage space, run the following command:

 

Vssadmin list shadowstorage

 

Alternatively, you can access the WMI object to check the used space:

 

Get-WMIObject Win32_ShadowStorage | Select-Object @{n=’UsedSpaceGB’;e={[math]::Round([double]$_.UsedSpace/1GB,3)}}, Volume

 

Reference:

 

Vssadmin list shadowstorage

 

Best Regards

Dale

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”


Thursday, January 20, 2011 2:08 PM

well, im not really sure, but maybe there are other files in there that VSS doesn’t include in its count? check and see what Explorer tells you the size is?