1st you have to have HyperV Role installed

define the ImageManagementService Class as Variable

$Disk=Get-WmiObject Msvm_ImageManagementService -namespace “rootvirtualization” –computername .

Call mount method which require only the full path for your vhd drive like the example below:

$disk.mount(“C:Program FilesMicrosoft Learning50028BDrives50028-DC1-Data.vhd”)

once the command succeed you will see like new drive is being installed in your notification area


the problem now that the disk is currently offline like the disk 2 in the image below so we have to bring online and then assign Drive letter.


we can do this also by Powershell but it is very long I will add it later.

Mahmoud Ibrahim (admin)

About the Author

Mahmoud Ibrahim has technology experience with over 18 years of IT industry. He'd worked in many organizations in many roles and expanded his knowledge across technology stacks, and he is enjoying sharing his expertise whenever possible :).
He is working as a presales expert in Micro Focus serving the international community.

View all posts by Mahmoud Ibrahim (admin)
Previous Article
Next Article