Summary: Use Windows PowerShell to find virtual hard disks on your system.
I notice that my disk space appears to be disappearing at a rapid rate, and I suspect someone is creating
virtual hard disks (VHDs) and forgetting about them. How can I use Windows PowerShell to find all the
VHDs on my system?
Use the Get-ChildItem (LS, Dir, gci are aliases), use a filter like *.vhd*, and specify the Recurse switched
parameter. To simply report on the path to the VHDs, select the FullName parameter. Here is an example:
Get-ChildItem -Path e: -Filter *.vhd* -Recurse -File | select fullname