Creating a RAMDisk in Server 2016 for IO Benchmarking

Hi Again everyone!  This post I’ll be showing some PowerShell commands for creating a RAMDisk.  Recently I was engaged at a client site where we were baking off Hyper-V vs VMware.  The Host and Network Stacks consisted of the same fabric but the storage back end were placed on different block level arrays with different specifications and running workloads so we needed a way to do an apples t.

We wanted our test results to have as few variables as possible so we decided to store our SQL dbs in a RAM Disk.  Follow the steps below if you ever have a need for it!



Here is the PowerShell for easy Copy/Paste

New-iscsiservertarget -TargetName “testramdisk”

Set-IscsiServerTarget -TargetName “testramdisk” -InitiatorId “IQN:*”

New-IscsiVirtualDisk –Path “ramdisk:test.vhdx” –Size 20MB

Add-iscsivirtualdisktargetmapping -targetname “testramdisk” -Path “ramdisk:test.vhdx”

First to Prepare your VM Make sure you have the iSCSI Target Server Role installed

Also make sure you have your local IP listed for the Target Portal under the iSCSI Initiator

Run the PowerShell Commands listed above

You should now see an Inactive iSCSI Target

Choose to Connect to this new target

Once you do you will see a new disk that is offline in Disk Management

Choose to Online the disk, Initialize the Disk, and Format the Disk with a drive letter.  You now have a functioning RAM Disk!

By |2017-03-16T13:59:26-06:00March 16th, 2017|Uncategorized|0 Comments

About the Author:

Consultant – Model Technology Solutions Nick is an IT professional with more than 19 years of experience and a passion for learning about technology. His areas of expertise include datacenter, hypervisors, storage, network, cloud, and OSD. He spends his free time delving in crypto, video games, automation, IoT, and really anything nerdy.

Model Technology

Let us help you get your end point and data center strategy on cruise control!  Ask about our Calibration Assessment.


  • 12125 Woodcrest Executive Drive, Ste. 204 Creve Coeur, MO 63141
  • (314) 254-4138