Retrieve all partition info from any windows server:
Partition Info:
(A:) 3 1/2 Inch Floppy Drive
(C:) NTFS 19.99GB (12.56GB Free)
(D:) NTFS 39.99GB (5.96GB Free) Data
(E:) CD-ROM Disc
This is a function in a script library. I use a scheduled agent to pull this data daily and write to a notes document.
Sub getPartitionInfo(doc As NotesDocument, strComputer As String)
Dim strPartition As String
strPartition = ""
On Error Goto errorHandler
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalDisk",,48)
Forall objItem In colItems
'This shows the different info you can actually query.
Print "Caption: " & objItem.Caption
Print "Description: " & objItem.Description
Print "DeviceID: " & objItem.DeviceID
Print "DriveType: " & objItem.DriveType
Print "FileSystem: " & objItem.FileSystem
Print "FreeSpace: " & objItem.FreeSpace
Print "Name: " & objItem.Name
Print "ProviderName: " & objItem.ProviderName
Print "Size: " & objItem.Size
Print "VolumeName: " & objItem.VolumeName
'Check if it's a Disk Drive (thus no memory) and just return it's drive letter and description
If objItem.DriveType = 2 Or objItem.DriveType = 5 Or objItem.DriveType = 4 Then
strPartition = strPartition + "(" + objItem.DeviceID + ") " + objItem.Description + Chr(13)
Else
'Show drive letter, description, total memory and remaining memory.
strPartition = strPartition + "(" + objItem.DeviceID + ") " + objItem.FileSystem + _
"