I have the requirement to check total size and free space for a variety of
UNC paths on EMC datamovers to check the file system sizes; I planned on
mapping drives to them and running the script below; which works fine but I
am limited to 22 drive letters at a time and I have over 300 unc paths to
test. Can someone point me in a more efficient direction where I can pass
UNC paths to a script similiar to below that will give me the data needed?


On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_LogicalDisk",,48)

For Each objItem in colItems
WScript.Echo "Description: " & objItem.Description
WScript.Echo "DeviceID: " & objItem.DeviceID
WScript.Echo "DriveType: " & objItem.DriveType
WScript.Echo "FileSystem: " & objItem.FileSystem
WScript.Echo "Size(GIG): " & (objItem.Size/1024)/1024/1024
WScript.Echo "FreeSpace(GIG): " & (objItem.FreeSpace/1024)/1024/1024
WScript.Echo ""
Next

Disk Statistics across many UNC path *report* by David

David
Tue Sep 27 09:00:58 CDT 2005


"David Doumani" <ddoumani@doumaniweb.com> wrote in message
news:O53MTHUuFHA.664@tk2msftngp13.phx.gbl...
>I have the requirement to check total size and free space for a variety of
>UNC paths on EMC datamovers to check the file system sizes; I planned on
>mapping drives to them and running the script below; which works fine but I
>am limited to 22 drive letters at a time and I have over 300 unc paths to
>test. Can someone point me in a more efficient direction where I can pass
>UNC paths to a script similiar to below that will give me the data needed?
>
>
> On Error Resume Next
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from
> Win32_LogicalDisk",,48)
>
> For Each objItem in colItems
> WScript.Echo "Description: " & objItem.Description
> WScript.Echo "DeviceID: " & objItem.DeviceID
> WScript.Echo "DriveType: " & objItem.DriveType
> WScript.Echo "FileSystem: " & objItem.FileSystem
> WScript.Echo "Size(GIG): " & (objItem.Size/1024)/1024/1024
> WScript.Echo "FreeSpace(GIG): " & (objItem.FreeSpace/1024)/1024/1024
> WScript.Echo ""
> Next
>