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!

About the Author: Nick Taylor

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.

Three Minutes For A More Secure & Efficient Infrastructure

Short and to the point, Steve’s Email Blasts give you endpoint management tips, tricks, and news in three minutes or less email read-time, guaranteed.

Model says no to spam. Privacy Policy

Model Technology Solutions

Model Technology Solutions is a small but mighty band of infrastructure experts. We’ve helped companies in diverse industries to modernize and automate their infrastructures through effectively managing their Microsoft endpoint suite.

With us on your team, you’ll watch your security and compliance go up and your IT team’s costs (and headaches) go down. You’ll relax in knowing that your endpoints will be secure and online when your users need them most. And you’ll finally get back to your most-important tasks.

Model Technology Solutions
12125 Woodcrest Executive Drive, Ste. 204 Creve Coeur, MO 63141

Phone: (314) 254-4138
General Inquiries: model@model-technology.com
Sales and Quotes: sales@model-technology.com