SSD Drive Script

I understand this is the script you have all been waiting for. Here it is…

Note: This script has been written to work with Configuration Manager 2007 and System Center 2012 Configuration Manager in a task sequence environment. Without modifications it will not work!

You can get the script via Google Docs so the formatting in WordPress doesn’t break the script. Make sure you download the script as you can’t view it online.

Based on the information from the previous post about the 8MB/s random read rate, this is what the section at the bottom does.

If intBytes > 8388608 Then
    Environment("IsSolidState") = True
    Environment("IsSolidState") = False
End If

We basically see if our average value over the course of the test is above or below this threshold and set a task sequence variable called IsSolidState to either true or false. Then from here you can use this in your task sequence.


Tags: , , ,

About Martyn

Martyn is one of the Senior Cloud Architects and DevOps Team Leader at one of the worlds leading Cloud Transformation Specialists Inframon. Martyn is responsible for the architecture of some of the largest Azure deployments in EMEA and is a advisor to a many businesses on their strategies. Martyn is a regular speaker at Microsoft events and community events on Azure and DevOps, giving his insight to a growing number of audiences.

21 responses to “SSD Drive Script”

  1. Karl Horvath says :

    I’m trying to get this to work in XP the NO SSD works fine the the detection piece is failing, the intBytes is always below 8mb or sometimes “0”, should I be interrogating a different variable?

    • Martyn says :

      No, try doing some disk activity! This is specifically designed for a task sequence OSD scenario, some other means will be required when running outside of this to generate some disk activity, also change the value to be something lower but much higher than a standard disk.

  2. thomas says :

    The threshold is 8MB/sec. The script is to get value of AvgDiskBytesPerRead which is a number of Bytes (not bytes/sec). is it correct?
    In Perfmon, PhysicalDisk has counter similar to property in WMI class. I guess it’s the same to use either of them, right?

  3. Chris says :


    We are not using SCCM and I am having trouble getting this to work as a simple VBS. Can someone please tell me how to achieve this? Thanks.

  4. Ed Failor says :

    Hi – the link to the script does not work. Can you post it here?

  5. Meesterlijk says :


    Cloud you profide me an example in standard vbs, so i can use this in a regular way (so not by running from within a tasksequence). I have been searching, but no resuls found. I need this to execute a commandline defragler from te context menu (it needs to know if it’s an ssd or ide-sata drive).

    Thanks in advance.

    Gr Mark

    • Meesterlijk says :

      Anyone please,……Martyn ?

      • Martyn says :

        Sorry been very busy, just remove everything but the function and change the return types to something of your choice.

      • Meesterlijk says :

        I will try martyn, i’m not a big scripter here……
        Thanks for the reply.

      • Martyn says :

        Let me know if you have any trouble and I will email you.

      • Meesterlijk says :

        Just did the thing you said, but the message returns no ssd on a ssd drive? Must be doing something wrong here.
        I will check on it later, busy week coming… Mail is welcome… lol

  6. Meesterlijk says :


    Sorry needed to start running that script from within a tasksequence…

  7. Meesterlijk says :

    How does this script works?
    get error when started…

  8. David says :

    Thank you for the script. This is extremly helpful!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: