I need to filter out the shared drives in this script located below. The
drive letters are Z,M,N,D,G. This is the code I'm currently using to display
information about my servers.
$strComputer = "servername"
$colItems = get-wmiobject -class "Win32_LogicalDisk" -namespace "root\CIMV2" `
-computername $strComputer
foreach ($objItem in $colItems) {
write-host "Caption: " $objItem.Caption
write-host "Compressed: " $objItem.Compressed
write-host "Description: " $objItem.Description
write-host "Device ID: " $objItem.DeviceID
write-host "File System: " $objItem.FileSystem
write-host "Free Space: " $objItem.FreeSpace
write-host "Name: " $objItem.Name
write-host "Provider Name: " $objItem.ProviderName
write-host "Size: " $objItem.Size
write-host "System Name: " $objItem.SystemName
write-host "Volume Name: " $objItem.VolumeName
write-host
}
|