NAME

Remove-HPOVResource

SYNOPSIS

Remove a resource from the appliance.

SYNTAX

Remove-HPOVResource -resource <Object> [-force <Boolean>] [<CommonParameters>]
Remove-HPOVResource -nameOruri <String> [-force <Boolean>] [<CommonParameters>]

DESCRIPTION

Removes a resource identified by either the resource uri or a resource object.
Remove-HPOVResource can be called with either -nameOrUri or -resource.

PARAMETERS

-resource <Object>
A resource object to be deleted. The resource object should first be retrieved by a call to a Get-HPOVxxx call.
Aliases -ro           
Required? true
Position? named
Default value <none>
Accept pipeline input? true (ByValue)     
Accept wildcard characters?     false

-nameOruri <String>
The name or uri of the resource to be deleted.
Aliases -uri, -name           
Required? true
Position? named
Default value <none>
Accept pipeline input? false
Accept wildcard characters?     false

-force <Boolean>
Set to $true to force-delete the resource.
Not all resources support force-delete.
Aliases None.           
Required? false
Position? named
Default value False
Accept pipeline input? true (ByValue)      
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).

INPUTS

System.Management.Automation.PSCustomObject

A valid resource object first retrieved by a call to a Get-HPOV*** cmdlet

OUTPUTS

System.Management.Automation.PSCustomObject

Removal async task.

RELATED LINKS

EXAMPLES

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

PS C:\> Remove-HPOVResource -nameOrUri "/rest/resource/1234-5678-9123"
Removes the resource specified by the URI

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

PS C:\> Remove-HPOVResource -nameOrUri "ServerProfile-A"
Removes the resource named "ServerProfile-A". If multiple resources exist with the name "ServerProfile-A", an error is returned.

-------------------------- EXAMPLE 3 --------------------------
PS C:\> $MyResourceObject = send-hpovrequest "/rest/resource/1234-5678-9123"
PS C:\> Remove-HPOVResource -resource $MyResourceObject
Removes the resource $MyReSourceObject.

Last edited Mar 13, 2014 at 5:02 AM by ChrisLynchHP, version 2