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
Get HPE OneView task objects that track the progress of long-running appliance operations.Syntax
Default
ResourceCategory
Description
Get-OVTask returns HPEOneview.Appliance.TaskResource objects that represent asynchronous operations tracked by HPE OneView. Most resource-modifying cmdlets return a task when the appliance cannot complete the operation synchronously.
Tasks are sorted by last-modified date, most recent first. You can filter by:
- Name — the task type name (e.g.,
Add server hardware). - State — task execution state (Running, Completed, Error, etc.).
- InputObject — a specific resource name, URI, or object.
- ResourceCategory — the REST category string of associated resources (e.g.,
server-hardware). - Count — a maximum number of records to return.
Wait-OVTaskComplete.
Parameters
Filter tasks whose
name property equals this value. The name is the task type description, such as Add server hardware or Update server profile.Alias: -TaskNameScope results to tasks associated with a specific resource. Accepts:
- A resource name string
- A resource URI string (starting with
/rest/) - A resource object with a
uriproperty
-ResourceFilter by the REST resource category of the associated resource. Examples:
server-hardware, enclosures, server-profiles, logical-interconnects.Alias: -CategoryFilter by task execution state. Multiple values can be provided. Valid values:
UnknownNewRunningPendingStoppingSuspendedTerminatedKilledCompletedErrorWarning
Maximum number of tasks to return. Defaults to 0 (all tasks matching filters). When
-Count is specified, results are also sorted by creation date descending.Specify one or more appliance connection objects or names. Defaults to the default connection in
$ConnectedSessions.Examples
Get all currently running tasks
Get the 20 most recently completed tasks
Get tasks associated with a specific server
Get all error tasks for server profiles
Get tasks by name (task type)
Check task state and wait if still running
Output
HPEOneview.Appliance.TaskResource
Key properties:
| Property | Type | Description |
|---|---|---|
name | String | Task type description |
taskState | String | Current execution state |
taskStatus | String | Detailed status message |
percentComplete | Int | Completion percentage (0–100) |
associatedResource.resourceName | String | Name of the resource the task operates on |
associatedResource.resourceCategory | String | Resource category |
created | DateTime | When the task was created |
modified | DateTime | When the task was last updated |
uri | String | URI of the task resource |
isCancelleable | Boolean | Whether the task can be cancelled with Stop-OVTask |
Related cmdlets
- Wait-OVTaskComplete
- Stop-OVTask — see source repository for cmdlet usage
- Get-OVAlert