How to disconnect media on all VMs in SCVMM 2008 R2 using PowerShell

Share this:

Hello folks,

Today I had a requirement to disable configure all VMs of a SCVMM 2008 R2 to  No Media and I could’ve gone to each one of the VMs, ask Properties and set the VM to No media however I’m kind of lazy and for that let’s use PowerShell.


Open SCVMM PowerShell, and run the following cmdlet:

Get-VirtualDVDDrive –VMMServer <name> –all | Set-VirtualDVDDrive –NoMedia

That’s it, time for a coffee because PowerShell save the day again!

Written by Anderson Patricio

Anderson Patricio is a Canadian Exchange Server MVP and MCSM (Solutions Master) and he contributes to the Microsoft Community with articles, tutorials, blog posts, forums and book reviews. He is a regular contributor at, and (Portuguese).