Today I wanted to remove a test vSphere host from my Lab environment but the option Remove was grayed out.


I couldn’t find any other options in vCenter so I tried it with PowerCLI. I took a look at the vSphere PowerCLI Cmdlets Reference and searched for the remove-vmhost cmdled. This is what the Cmdlets Reference returned:

Removes the specified hosts from the inventory.


Remove-VMHost [-VMHost] <VMHost[]> [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Detailed Description

Removes the specified hosts from the inventory.

So with the following command:

Remove-VMHost esx3.ict-freak.local -Confirm:$false

you can remove the vSphere host from the vCenter server. The –Confirm:$false parameter disables the confirm question.

I didn’t use the –Confirm parameter so I got the Confirm question:


After running the command the vSphere host was removed from my vCenter server. So PowerCLI to the rescue (again) 😉


3 thoughts on “Cannot Remove a vSphere host from vCenter

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.