Clean up vCenter with PowerShell after SCVMM leaves

Microsoft System Center Virtual Machine Manager (SCVMM) 2008 makes several changes to your vCenter environment that you may like to know about, especially since they don’t seem to be mentioned in the product documentation.  It’s also worth pointing out that none of these changes are reverted when you subsequently decide to discontinue managing vCenter with SCVMM.

There are three different affected areas and you can fix each one manually or all in one shot with a VI Toolkit (for Windows) PowerShell script that I wrote for just this purpose.

1.  SCVMM Port Groups


First, let’s address the new port groups that SCVMM created when managing your VMware ESX VMs.  I covered this in more detail in a previous article.  Essentially, the SCVMM interface presents vSwitches, not port groups.  It then creates one or more new port groups for you without warning — one per vSwitch, per VLAN, on each ESX host.

To recover from this mess, you will need to reconfigure any VMs that are currently using these port groups and then delete the port groups from the vSwitches.  If you have more than a couple VMs this task will be easier with the script.

2.  Custom Attribute: ClusterInvariantVMMId

I bet you did not know that SCVMM would add a new strangely-named custom attribute to vCenter and tag every single VM in your inventory with a GUID.  I’ve heard puzzled VMware customers asking about this.  Initially, the explanation for this phenomenon was not clear — until I evaluated the SCVMM product and VMware vCenter integration.  If you are done with SCVMM, it is safe to remove this attribute with VI Client (on the Administration menu).


3.  Self-Service Role

Evidently the Self-Service Portal feature of SCVMM will allow users to provision and manage VMs on ESX hosts in addition to Hyper-V.  I tried this and it did not work, but I probably wasn’t persistent enough.  When you are done using SCVMM you won’t be needing that role anymore — go ahead and delete it.


PowerShell Cleanup Script

If you would like to clean up all three of these issues in one step, use the following VI Toolkit (for Windows):

If you or one of your coworkers accidentally polluted your vCenter environment, this should help you get everything back in order.

Thanks go to Carter Shanklin for reviewing the script.

(Visited 813 times, 1 visits today)

Tags: , , , , ,


  1. Hany Michael’s avatar


    Great post! I’ve been always wondering what the SCVMM is leaving behind when managing vCenter.


  2. Alan Renouf’s avatar

    Nice script, hope you dont mind but I posted an article on my blog about this, very nice use of the VI Toolkit.

  3. Eric Gray’s avatar

    @Hany: Thanks!

    @Alan: Mind? Heck no! I’m flattered.

Comments are now closed.