Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Correlate Logical Drives and Physical Disks?

Hey, Scripting Guy! How can I correlate logical drives and physical disks?-- LB Hey, LB. We’ll make a deal with you: we’ll show you a script that can tell you which logical drives are found on which physical disks, and you promise not to say, “Wait, I don’t understand how this script works.” To tell you the truth, we’re not so ...

How Can I Determine the Next Available Drive Letter on a Computer?

Hey, Scripting Guy! How can I determine the next available drive letter on a computer?-- TW Hey, TW. Interesting question, and one that crops up from time-to-time. In the old days, when users only had drives A, B, and C, this was easy; you could pretty much guess that any drive letter other than those three would be available. Nowadays, ...

How Can I Determine the Percentage of Free Space on a Drive?

Hey, Scripting Guy! I know how to determine the amount of free space on a drive, but how can I determine the percentage of free disk space on a drive?-- MS Hey, JP. You’re right: determining the amount of free disk space on a drive is pretty easy. For example, this simple little script tells you the amount of free space (in bytes) for ...