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

Integration between Hyper-V Network Virtualization... One of features on Windows Server 2012 R2 that was improved since the last version is network virtualization. Virtual networks are created by using Hy...
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...
Server management and automation with Windows Serv... Datacenter infrastructure has become complex: Multiple industry standards are confusing hardware vendors, and customers are looking for guidance on ho...
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...