Skip to content

Remove-OVServer

Syntax

Remove-OVServer
    [-InputObject] <Object>
    [-ApplianceConnection] <Object>
    [-Force]
    [<CommonParameters>]

Description

Removes a physical server object from appliance management.

The server object can be specified by its name or its full URI on the appliance by using the -Server parameter. It can also be supplied as an object by using the -resource parameter the object variable can be piped to Remove-OVServer.

Blade servers can only be removed by removing the enclosure (Remove-OVEnclosure), or phyhsically removing the blade from the enclosure.

Examples

Example 1

$task = Remove-OVServer -name "Server-1234" -force
Wait-OVTaskComplete $task

Force-remove the server specifed by name. Wait for remove to complete.

Example 2

$server = Get-OVServer -name "Server-1234"
Remove-OVServer $server -confirm:$false

Remove the server specifed by $server. Disable confirmation prompt.

Example 3

$server = Get-OVServer -name "Server-1234"
Remove-OVServer $server -confirm:$false -force

Remove the server specifed by $server. Disable confirmation prompt, and force remove the server.

Example 4

Get-OVServer | Remove-OVServer

Search for all rackmount servers and remove them from appliance.

Parameters

-InputObject <Object>

The Server object(s), name(s) or uri(s) to be removed from management.

Aliases uri, name, Server
Required? True
Position? Named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? False

-Force <SwitchParameter>

Use to force-remove the server. For example, if the server is gone or managed by a different appliance, force-remove will remove the server from this appliance without removing any of the HPE OneView applied configuration.

When the request is accepted by the appliance, it does not return an Async Task Resource.

Aliases None
Required? False
Position? Named
Default value False
Accept pipeline input? false
Accept wildcard characters? False

-ApplianceConnection <Object>

Specify one or more [HPEOneView.Appliance.Connection] object(s) or Name property value(s). If Resource object is provided via Pipeline, the ApplianceConnection property of the object will be used.

Aliases Appliance
Required? True
Position? Named
Default value (${Global:ConnectedSessions} | ? Default)
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-WhatIf <SwitchParameter>

Aliases wi
Required? False
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

-Confirm <SwitchParameter>

Aliases cf
Required? False
Position? Named
Default value
Accept pipeline input? false
Accept wildcard characters? False

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216)

Input Types

Provide the Server Resource Object

Return Values

Async removal task

When using the -Force parameter, a PSCustomObject is returned indicating successful removal of the resource