Here’s just a little Powershell script to change the CDrom drive letter to another drive letter, most customers use a standardized drive letter for this type of drive.
(gwmi Win32_cdromdrive).drive | %{$a = mountvol $_ /l;mountvol
$_ /d;$a = $a.Trim();mountvol z: $a}
This script looks up the cdrom drive and changes the drive letter to Z:, so just change Z: from the script into the drive letter of choice and you’re good to go.
In Automation Manager you would configure this Powershell script like this:
I’ve used this script on ESXi guests running Windows 2003, 2008 and 2008 R2. Test this script before using it in production! I found this script on this blog.
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.
Latest posts by Kees Baggerman (see all)
- Nutanix AHV and Citrix MCS: Adding a persistent disk via Powershell – v2 - November 19, 2019
- Recovering a Protection Domain snapshot to a VM - September 13, 2019
- Checking power settings on VMs using powershell - September 11, 2019
- Updated: VM Reporting Script for Nutanix with Powershell - July 3, 2019
- Updated (again!): VM Reporting Script for Nutanix AHV/vSphere with Powershell - June 17, 2019