Remove-VMHost

This cmdlet removes the specified hosts from the inventory.

Syntax

-VMHost  <VMHost[]>
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VMHost
VMHost[] named
  • wildcards
  • pipeline
  • Specifies the hosts you want to remove.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.

    Output

    Examples


    Example 1

    $myServer = Connect-VIServer -Server 10.23.112.235
    Get-VMHost -Server $myServer -Location MyDatacenter1 | Remove-VMHost -Confirm:$false

    Removes all VM hosts in the specified location from the vCenter Server system without asking for confirmation.

    Related Commands

    Feedback

    Was this page helpful?