In this article, I’ll show how to add A Virtual Disk or a Physical disk to a Virtual Machine or Physical Server using Windows PowerShell.
With Windows Nano Server 2016 this Is the only way to add more storage to a Nano Server Virtual machine.
In this article, I’ll be using the built In Windows PowerShell Storage Module.
To get started, I have added 50GB Virtual Disk to a VM using Hyper-V.
To view the new disk run the cmdlet
Get-Disk
Note the disk number on the left column, In my case, It’s number 1
Next, I’ll Initialize the new disk using
Initialize-Disk -Number 1
Next, I’ll create a new partition using the entire disk and assign a drive letter automatically
New-Partition -DiskNumber 1 -UseMaximumSize -AssignDriveLetter
As seen below, The new disk has been created with drive Letter E
Note down the Drive Letter and format the volume using
Format-volume -driveletter e
To view the new volume use:
Get-Volume