Powershell script to get the drive speed.

I need to find out the drive speed (for example, 5400 RPM, 7200 RPM) for 2000 odd servers. This information is not stored in the registry, neither in the WMI classes. Any help would be greatly appreciated.

Thank you.

Parents
No Data
Reply
  • $ComputerName = ".", "."

    ForEach ($C in $ComputerName)
    {
    $Hash = @{
    "ComputerName" = $C
    "namespace" = "root\Microsoft\Windows\Storage"
    "Class" = "MSFT_PhysicalDisk"
    "ErrorAction" = "Stop"
    }

    Try
    {
    Get-WMIObject @Hash |
    Select-Object -Property @{N="ComputerName"; E={$C}},
    @{N="Speed(RPM)";E={$_.SpindleSpeed}}, DeviceID,
    @{N="Supported";E={$True}}
    }
    Catch
    {
    $Obj = New-Object -TypeName PSObject -Property @{
    "ComputerName" = $ComputerName
    "Speed" = $Null
    "DeviceID" = $Null
    "Supported" = $False
    }
    Write-Output $Obj
    }

    }
Children
No Data