9070

If you have clients that are still using old, spinning HDD drives instead of modern solid-state drives (SSDs), there is an opportunity for you to make a sale by convincing clients of the benefits of them upgrading.

But the problem is, most users don’t know which type of hard drive they have and having one of your team check every machine in person would take far too long. Luckily, you can use a script to check each endpoint’s hard drive type with just a few clicks. 

Once this component has been run, you will have a list of all the devices you manage which are still using HDDs. If you can convince these users to upgrade to SSDs, not only will you make some additional sales, but you will also have less support calls to deal with going forward, as SSD drives are more reliable and less prone to failure than HDDs.

The Code

$CustomUDF=$env:CustomUDF

$ErrorActionPreference= 'silentlycontinue'

$MainDisk = "No"
ForEach ($disk in (Get-PhysicalDisk | Select-Object DeviceID, MediaType, Size)){
     If ($disk.MediaType -eq 'SSD' -and $disk.Size -gt 100GB){
         $MainDisk = "Yes"
         break
     }
}

[int]$env:usrUDF = '7'
if ([int]$env:usrUDF -and [int]$env:usrUDF -match '^\d+$') {
    
    # Validate the variable value is between 1 and 30
    if ([int]$env:usrUDF -ge 1 -and [int]$env:usrUDF -le 30) {     
            New-ItemProperty -Path "HKLM:\SOFTWARE\CentraStage" -Name Custom$env:usrUDF -Value $MainDisk -Force | Out-Null
            write-host "BitLocker key written to UDF $env:usrUDF`."
        } 
    else {
        write-host "UDF must be an integer between 1 and 30."
    }
} else {
    write-host "UDF value invalid or not specified - not writing results to UDF 7."
}

What Happens When You Run This Code?

This can be run on multiple machines at a click of a few buttons. After it’s finished you can create a filter to show you all the endpoints that still use HDDs and then contact those users (or their employer) about upgrading.

Want More Expert Tips Like This?

When MSPs work with our mentors, they gain the benefit of decades of combined experience across different IT sectors. This ranges from sales and marketing, to support and engineering. If you need help growing and improving your MSP, please contact us today. 

Share

Post comment

Your email address will not be published. Required fields are marked *

Go top