Tuesday, August 18, 2015

PowerShell Tips : Find Hard Disk Drives and USB Disk Drives using PowerShell.


Do you ever eager to know, how may Disk drives are attached to your system by using PowerShell? if yes! then you must try the Get-Disk cmdlet.

When you run the Get-Disk cmdlet, it shows you list of all list drives you have attached to the system.

And! if you eager to know , that, how many USB disk drives are attached to your system, then you, can select to show the BusType equal to USB and it will show you only the list of USB hard disk drives attached to your laptop.


Get-disk |  where { $_.bustype -eq "usb" }


Aman Dhally - Manya Kaur




Aman Dhally
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.


1 comment: