Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
942 B

  1. Option Explicit
  2. DIM objSet, objVolume, objShadows, strQuery, objStorage, objDiffVolume
  3. Set objSet = GetObject("winmgmts:").InstancesOf("Win32_Volume")
  4. wscript.echo "Shadow Copies per Volume"
  5. wscript.echo "-----------------------"
  6. for each objVolume in objSet
  7. Set objShadows = objVolume.Associators_("Win32_ShadowFor",,,,,,,,0)
  8. wscript.echo " " & objShadows.Count & " " & objVolume.Name
  9. next
  10. ' Get the amount of space used for each Shadow Storage diff area. Broken: BUG 615640
  11. 'strQuery = "select * from Win32_ShadowStorage"
  12. 'set objSet = GetObject("winmgmts:").ExecQuery(strQuery)
  13. 'wscript.echo "Shadow Storage Space Usage (MB)"
  14. 'wscript.echo "-------------------------------"
  15. 'for each objStorage in objSet
  16. ' Set objDiffVolume = GetObject("winmgmts:" & objStorage.DiffVolume)
  17. ' wscript.echo " " & objStorage.UsedSpace / 1024 / 1024 & " " & objDiffVolume.Name
  18. 'next