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

iSCSI connection issues with Hyper-V Server If you have a Hyper-V Cluster connected through iSCSI to a storage solution and sometimes you get errors that your CSV volumes went offline. In some c...
Capacity Planner for Hyper-V Replica Hyper-V in Windows Server 2012 includes a new capability called Hyper-V Replica. Hyper-V Replica allows administrators to replicate their virtual mach...
SCOM Alert: WinRM is not functional or not the rig... On System Center 2012 R2 Operations Manager (SCOM) (with UR2) starting to appear Critical Alerts coming from System Center Advisor (SCA) saying that m...
Enabling and disabling the graphical interface in ... Server Core has many installation benefits, but there are a few situations where the GUI is better and provides more options; for example, when we nee...