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.

image

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

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange and several other certifications. Anderson has been contributing to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at ITPROCentral.com, MSExchange.org, Techgenix.com and Anderson Patricio.org (Portuguese).

Related Post

Updates on Hyper-V Server? How to see what had bee... When do you need to see what updates had been installed on your Hyper-V server, you can use this PowerShell cmdlet to list all the updates. Get-WmiOb...
Managing Hyper-V Server remotely through PowerShel... Working with PowerShell can be very common for daily tasks and Hyper-V Server management. However, as there is more than one server to be managed, som...
Statistics of a NIC Teaming If the UI window is sufficiently tall a statistics tile appears at the bottom of the Team tile and the Adapters and Interfaces tile. These statistics ...
Cluster Shared Volumes (CSV) errors on Hyper-V Clu... In a failover cluster, virtual machines can use Cluster Shared Volumes that are on the same LUN (disk), while still being able to fail over (or move f...