PowerTip: Use PowerShell to Test Virtual Hard Disks

PowerTip: Use PowerShell to Test Virtual Hard Disks

  • Comments 1
  • Likes

Summary: Use Windows PowerShell to test your virtual hard disks.

Hey, Scripting Guy! Question How can I easily test the virtual hard disks on my Windows 8.1 laptop to ensure that they will work?

Hey, Scripting Guy! Answer Get a collection of all .vhd and .vhdx disks, then pipe the resulting objects to the Test-VHD cmdlet:

Get-ChildItem -Path E:\vms\ -Recurse -Include *.vh* | Test-VHD

You can shorten the command to:

gci E:\vms\ -r -in *.vh* | Test-VHD

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment