By David Wiseman (Administrator)Created 20 Feb 2008
My Rating:
Vote
Rating:
Not Rated
Views:4705
Downloads:32

List Logical Disk Drive Properties

Language:  KiXtart

Compatibility

Windows XP Yes Windows 2003 Yes
Windows 2000 Yes Windows NT Yes
Vista Unknown Windows 2008 Unknown
Description

Lists the properties for all the logical disk drives on a computer.

Code

Line Numbers: On  Off      Plain Text
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\"+ $strComputer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_LogicalDisk")
For Each $objItem in $colItems
    ? "Access:" + $objItem.Access
    ? "Availability:" + $objItem.Availability
    ? "Block Size:" + $objItem.BlockSize
    ? "Caption:" + $objItem.Caption
    ? "Compressed:" + $objItem.Compressed
    ? "Config Manager Error Code:" + $objItem.ConfigManagerErrorCode
    ? "Config Manager User Config:" + $objItem.ConfigManagerUserConfig
    ? "Creation Class Name:" + $objItem.CreationClassName
    ? "Description:" + $objItem.Description
    ? "Device ID:" + $objItem.DeviceID
    ? "Drive Type:" + $objItem.DriveType
    ? "Error Cleared:" + $objItem.ErrorCleared
    ? "Error Description:" + $objItem.ErrorDescription
    ? "Error Methodology:" + $objItem.ErrorMethodology
    ? "File System:" + $objItem.FileSystem
    ? "Free Space:" + $objItem.FreeSpace
    ? "Install Date:" + $objItem.InstallDate
    ? "Last Error Code:" + $objItem.LastErrorCode
    ? "Maximum Component Length:" + $objItem.MaximumComponentLength
    ? "Media Type:" + $objItem.MediaType
    ? "Name:" + $objItem.Name
    ? "Number Of Blocks:" + $objItem.NumberOfBlocks
    ? "PNP Device ID:" + $objItem.PNPDeviceID
    For Each $x in $objItem.PowerManagementCapabilities
        ? "Power Management Capabilities:" + $x
    Next
    ? "Power Management Supported:" + $objItem.PowerManagementSupported
    ? "Provider Name:" + $objItem.ProviderName
    ? "Purpose:" + $objItem.Purpose
    ? "Quotas Disabled:" + $objItem.QuotasDisabled
    ? "Quotas Incomplete:" + $objItem.QuotasIncomplete
    ? "Quotas Rebuilding:" + $objItem.QuotasRebuilding
    ? "Size:" + $objItem.Size
    ? "Status:" + $objItem.Status
    ? "Status Info:" + $objItem.StatusInfo
    ? "Supports Disk Quotas:" + $objItem.SupportsDiskQuotas
    ? "Supports File Based Compression:" + $objItem.SupportsFileBasedCompression
    ? "System Creation Class Name:" + $objItem.SystemCreationClassName
    ? "System Name:" + $objItem.SystemName
    ? "Volume Dirty:" + $objItem.VolumeDirty
    ? "Volume Name:" + $objItem.VolumeName
    ? "Volume Serial Number:" + $objItem.VolumeSerialNumber
Next

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      
Be the first to post a comment!