Powershell script to query a disk with label

Powershell script to list a disk with a label.

The below script will list out a disk with label "backup"

(Get-WMIObject Win32_Volume | ? { $_.Label -eq 'backup' }).name

Comments