Quantcast
Channel: Windows Server ––Virtualize & Automate–
Viewing all articles
Browse latest Browse all 11

Change CD ROM Drive Letter in Newly Built VM’s to Z: Drive

$
0
0
1
2
3
4
5
6

 
<#Hi Guys sharing with you a script i developed to change the CD-ROM Drive in a newly provisioned Virtual Machine Using Hyper-V, You can modify the script accordingly for other drive letters.
Change CD ROM Drive Letter in Newly Built VM's to Z: Drive#>
 
<#Copy paste the one liner in an elevated Powershell window.#>
 
(gwmi Win32_cdromdrive).drive | %{$a = mountvol $_ /l;mountvol $_ /d;$a = $a.Trim();mountvol z: $a}

The post Change CD ROM Drive Letter in Newly Built VM’s to Z: Drive appeared first on --Virtualize & Automate--.


Viewing all articles
Browse latest Browse all 11

Trending Articles