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

Performing daily task with PowerShell to manage Hy... As a virtualization administrator, you will come across a lot of scenarios where you will need to create, modify, move, export, and other tasks to man...
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...
Update on System Center 2012 SP1 Update Rollup 2 (... Yesterday Microsoft added Update Rollup 2 for System Center 2012 SP1 Virtual Machine Manager to System Center 2012 SP1 Update Rollup 2 release. The m...
Creating a NIC teaming There are two ways to invoke the New Team dialog box: Select the Tasks menu in the Teams tile and then select New Team, or Right click on an availa...