|

Change CDrom drive letter with PowerShell

1 min read

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 Senior Technical Director — Performance & Solutions Engineering R&D at Nutanix, where he leads a global team responsible for defining how enterprise applications are delivered on the Nutanix platform. A former Citrix Technology Professional and NVIDIA Enterprise Platform Advisor, he has spent 15+ years driving EUC strategy and technical direction across architecture, product, and customer success. He has been writing here since 2011 — sharing what he learns at the intersection of platform engineering and enterprise IT.
Kees Baggerman

Kees Baggerman

Senior Technical Director at Nutanix - Former Citrix CTP - NVIDIA Enterprise Platform Advisor - 15+ years in EUC

Kees Baggerman is Senior Technical Director — Performance & Solutions Engineering R&D at Nutanix, where he leads a global team responsible for defining how enterprise applications are delivered on the Nutanix platform. A former Citrix Technology Professional and NVIDIA Enterprise Platform Advisor, he has spent 15+ years driving EUC strategy and technical direction across architecture, product, and customer success. He has been writing here since 2011 — sharing what he learns at the intersection of platform engineering and enterprise IT.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

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