Windows Server 2016 – Create VHD(X) files with Server Manager and PowerShell

  1. Open Server Manager
  2. Click Tools and Computer Management

, <span>Windows Server 2016 – Create VHD(X) files with Server Manager and PowerShell</span>, KandZ

3.  Click Disk ManagementAction and then Create VHD

, <span>Windows Server 2016 – Create VHD(X) files with Server Manager and PowerShell</span>, KandZ

4. Click Browse to select or write the file and location for the new Virtual Hard Disk. Write the size for the new virtual hard disk and if it is Fixed size or Dynamically expanding. Then click OK.

, <span>Windows Server 2016 – Create VHD(X) files with Server Manager and PowerShell</span>, KandZ

After you created the new Virtual Hard Disk, it appears as an uninitialized disk in the Disk Management.

, <span>Windows Server 2016 – Create VHD(X) files with Server Manager and PowerShell</span>, KandZ

Create Virtual Hard Disk with Windows PowerShell

You need to install (if it is not installed already) the hyper-v-PowerShell feature:

install-windowsfeature -name hyper-v-powershell

Then

new-vhd -path c:\share\disk1.vhd -sizebyte 2gb

, <span>Windows Server 2016 – Create VHD(X) files with Server Manager and PowerShell</span>, KandZ

Some available parameters:

  • path specifies the location and filename for the new virtual hard disk
  • sizebytes specifies the size and you can use MB , GB, TB.
  • fixed / dynamic to allocate all the storage space specified in the sizebytes or a smaller virtual hard disk which expands as needed
  • sourcedisk the location of a physical disk to be copied to the new virtual hard disk.
25650cookie-checkWindows Server 2016 – Create VHD(X) files with Server Manager and PowerShellWindows Server 2016 – Create VHD(X) files with Server Manager and PowerShell

Related posts

Leave a Comment