September 28th, 2015

PowerTip: Use PowerShell to Identify Bootable Disks

Doctor Scripto
Scripter

Summary: Use the Get-Disk cmdlet to identify all bootable devices that are attached.

Hey, Scripting Guy! Question How can I use Windows PowerShell to see which USB devices are set to be bootable on my workstation?

Hey, Scripting Guy! Answer Use the Get-Disk cmdlet and filter on the BootFromDisk and BusType properties, for example:

Get-Disk | Where { $_.BusType -eq 'USB' -and $_.BootFromDisk -eq $TRUE }   


Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.