Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/HewlettPackard/POSH-HPEOneView/llms.txt

Use this file to discover all available pages before exploring further.

Synopsis

Removes one or more server hardware resources from HPE OneView.

Syntax

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

Description

Remove-OVServer removes the specified server hardware resource from HPE OneView. The server is de-registered from the appliance; the physical hardware is not affected. Before removing a server, any assigned server profile must be unassigned or deleted. If a profile is still assigned, the operation will fail unless -Force is used. The cmdlet supports pipeline input, so you can pipe the output of Get-OVServer directly to Remove-OVServer for bulk operations.
Removing a server from HPE OneView is irreversible. All HPE OneView configuration and monitoring history associated with the server will be deleted. Re-adding the server requires re-importing it with Add-OVServer.

Parameters

InputObject
Object
required
The server hardware object, URI string, or name to remove. Accepts pipeline input. The Server alias is also accepted.
Force
Switch
Force removal even if a server profile is still assigned. The profile assignment will be cleared automatically. Use with caution.
ApplianceConnection
Object
The appliance connection object or name. Defaults to the default connected session. Accepted from the pipeline by property name.
Confirm
Switch
Prompts for confirmation before each removal. The cmdlet has a high ConfirmImpact, so confirmation is requested by default when $ConfirmPreference is High or lower.

Examples

Remove a server by name

$server = Get-OVServer -Name "Encl1, bay 1"
Remove-OVServer -InputObject $server
Removes the server Encl1, bay 1 from HPE OneView after confirmation.

Remove a server using the pipeline

Get-OVServer -Name "Encl1, bay 1" | Remove-OVServer
Pipes the server object directly into Remove-OVServer.

Remove multiple servers without confirmation

Get-OVServer -Name "Encl1*" | Remove-OVServer -Confirm:$false
Removes all servers whose names begin with Encl1 without prompting for confirmation.

Force-remove a server that still has a profile assigned

Get-OVServer -Name "dl380-prod-01" | Remove-OVServer -Force
Forces removal even if a server profile is still assigned. The profile assignment is cleared as part of the operation.

Output

HPEOneView.Appliance.TaskResource Returns an async task resource for each removal operation.

Build docs developers (and LLMs) love