Nutanix AHV and Citrix MCS: Adding a persistent disk via Powershell – v2

Powershell

After writing this blogpost on  Adding a persistent disk via Powershell with Citrix MCS running on Nutanix AHV I got an email from one of our senior system architects, he asked me about this configuration so I shared the blogpost with him and his customer to find out that this customer enhanced the scripting part by using powershell and ControlUp to initialize format and assign a drive letter to the disk. Smart usage of available tools!

While this customer has ControlUp in the environment (which has full integration with Nutanix AHV by the way: https://www.controlup.com/?s=nutanix) you might not be so lucky to have these tools available. Does that mean you’re left out? Nah, you can easily run the script with a login script or via GPP/GPO so using this script might still be veasable for you!

The new script

Here’s the script Andrew Gresbach has kindly offered to share in this post, it’s simple but immensely effective:

From Andrew:

Here is the contents of the 2nd script that I threw together that I am running through ControlUP (which basically just runs the powershell commands on the end point Windows vm through their agent).   Where the disk add script runs via the Nutanix commandlets at the hypervisor level, this one has to run on the vm level (to simulate like you would do it in Windows)

This one does 3 things basically:

  1. Initializes the newly added disk
  2. Formats the disk and adds the new drive letter d:
  3. Creates the folder “Logs” on the new d:  (since Windows can’t write event logs to the root of a drive it needs a folder)

And the last part is following any one of the steps in this article to hide the d: from Windows Explorer: https://www.thewindowsclub.com/show-hide-a-drive-in-windows [thewindowsclub.com]

The previous script

Just for completeness, here’s the script previously mentioned:

 

 

Hopefully this helps you when configuring a persistent disk for non-persistent desktops provisioned with Citrix MCS on Nutanix AHV. 

The following two tabs change content below.

Kees Baggerman

Kees Baggerman is a Staff Solutions Architect for End User Computing at Nutanix. Kees has driven numerous Microsoft and Citrix, and RES infrastructures functional/technical designs, migrations, implementations engagements over the years.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.