Hello,
My assignment is to create a script that will get report all disks, sizes
and free space from all our domain member servers.
Now I'm trying to find a way to get the free (or used) disk space
information in a volume mount point disk
I have the script ready and it's working like a charm. The only thing it
doesn't do is report the disks who do not have a drive letter assigned but
are mounted inside another disk instead.
We have a lot of servers who have their volumes mounted and I can't use a
3rd party app.
The only thing I can find for mountpoints is a default example app which I
modified to just report the volume mount points and not ALL disks drives.
Unfortunately "Win32_MountPoint" does not support the property "FreeSpace"
This is all i have for now:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery _
("SELECT * FROM Win32_MountPoint")
For Each objItem In colItems
DirL =
Mid(objItem.Directory,Instr(objItem.Directory,"=")+1,len(objItem.Directory))
If len(DirL) > 6 then
WScript.Echo "Directory: " & objItem.Directory
WScript.Echo "Volume: " & objItem.Volume
end if
Next
Thanks in advance,
Albert.
Bookmarks