Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Create a New VHD with Windows PowerShell

$
0
0

Summary: Use Windows PowerShell to create a new virtual hard disk to use with Hyper-V.

Hey, Scripting Guy! Question How can I create a new virtual hard disk in Hyper-V?

Hey, Scripting Guy! Answer Use the New-VHD cmdlet.

This will create a 60 GB dynamic disk VHDX file under C:\VHD\ called Mydrive.vhdx:

NEW-VHD -Dynamic C:\VHD\MyDrive.vhdx -SizeBytes 60GB

This will create a 5 GB fixed disk VHDX file under C:\VHD\ called FixedDisk.vhdx:

NEW-VHD -Fixed C:\VHD\FixedDisk.vhdx -SizeBytes 5GB


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>