Remove HPOVServer - HewlettPackard/POSH-HPEOneView GitHub Wiki

HPE OneView 4.10 Library

Remove-HPOVServer

Remove a rackmount server from the appliance.

SYNTAX

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

Detailed 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-HPOVServer.

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

Parameters

-ApplianceConnection <Object>

Aliases [-Appliance]

Specify one or more HPOneView.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.

Default Value: ${Global:ConnectedSessions} | ? Default

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

-Confirm <SwitchParameter>

Aliases cf
Required? false
Position? named
Default value
Accept pipeline input? false
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

-InputObject <Object>

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

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

-WhatIf <SwitchParameter>

Aliases wi
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

System.Management.Automation.PSCustomObject

Provide the Server Resource Object

Return Values

HPOneView.Appliance.TaskResource [System.Management.Automation.PSCustomObject]

Async removal task

System.Management.Automation.PSCustomObject

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

Examples

 -------------------------- EXAMPLE 1 --------------------------

$task = Remove-HPOVServer -name "Server-1234" -force Wait-HPOVTaskComplete $task

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

 -------------------------- EXAMPLE 2 --------------------------

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

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

 -------------------------- EXAMPLE 3 --------------------------

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

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

 -------------------------- EXAMPLE 4 --------------------------

Get-HPOVServer | Remove-HPOVServer

Search for all rackmount servers and remove them from appliance.

Related Links


Top

HPE OneView 4.00 Library

Remove-HPOVServer

Remove a rackmount server from the appliance.

SYNTAX

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

Detailed 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-HPOVServer.

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

Parameters

-ApplianceConnection <Object>

Aliases [-Appliance]

Specify one or more HPOneView.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.

Default Value: ${Global:ConnectedSessions} | ? Default

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

-Confirm <SwitchParameter>

Aliases cf
Required? false
Position? named
Default value
Accept pipeline input? false
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

-InputObject <Object>

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

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

-WhatIf <SwitchParameter>

Aliases wi
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

System.Management.Automation.PSCustomObject

Provide the Server Resource Object

Return Values

HPOneView.Appliance.TaskResource [System.Management.Automation.PSCustomObject]

Async removal task

System.Management.Automation.PSCustomObject

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

Examples

 -------------------------- EXAMPLE 1 --------------------------

$task = Remove-HPOVServer -name "Server-1234" -force Wait-HPOVTaskComplete $task

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

 -------------------------- EXAMPLE 2 --------------------------

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

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

 -------------------------- EXAMPLE 3 --------------------------

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

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

 -------------------------- EXAMPLE 4 --------------------------

Get-HPOVServer | Remove-HPOVServer

Search for all rackmount servers and remove them from appliance.

Related Links


Top
⚠️ **GitHub.com Fallback** ⚠️