Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Tell Whether a Computer has a Specific CD in It?

Hey, Scripting Guy! How can I tell whether or not a computer has a CD named MyApps in it?-- CB Hey, CB. You know, this is one of those questions that the Scripting Guys almost feel bad about answering. Why? Well, at first glance this sounds like it might be a really complicated problem to solve; as it turns out, however, it’s pretty easy...

How Can I Get a List of Installed Device Drivers?

Hey, Scripting Guy! How can I get a list of installed device drivers, their version number, and their date?-- SH Hey, SH. You know, as we’re writing this column the first round of the NCAA men’s basketball tournament is in full swing. But don’t worry: despite the fact that this year’s opening round games are all being broadcast live...

How Can I Determine Which USB Devices are Connected to a Computer?

Hey, Scripting Guy! How can I determine which USB devices are connected to a computer?-- WM Hey, WM. If you watch a lot of TV - um, not that the Scripting Guys do; we spend our spare time reading the works of Shakespeare, solving differential equations, and otherwise tending to our many intellectual pursuits. As we’ve been told, however, ...

How Can I Tell If a File Exists on a CD or DVD Drive?

Hey, Scripting Guy! How can I tell whether a file exists on any CD or DVD drive connected to a computer?-- GH Hey, GH. Well, one way to do this would be to search the entire file system - including any mapped network drives - and check to see if a file (let’s call it Budget.xls) can be found anywhere. Assuming you find such a file, you ...

How Can I Tell if a Computer Has a DVD Drive Installed?

Hey, Scripting Guy! How can I tell if a computer has a DVD drive installed?-- GC Hey, GC. No doubt you’re hoping we’ll say something like, “Why, you just use the Win32_DVD class, of course.” Unfortunately, though, we can’t say that; that’s because there is no Win32_DVD class, or any class devoted to DVD drives. There is, of course...