Get-OVTask
Syntax
Get-OVTask
[-Name <String>]
[-InputObject <Object>]
[-State <String>]
[-Count <Int32>]
[-ApplianceConnection <Object>]
[<CommonParameters>]
Get-OVTask
[-Name <String>]
[-ResourceCategory <String>]
[-State <String>]
[-Count <Int32>]
[-ApplianceConnection <Object>]
[<CommonParameters>]
Description
Obtain a collection of task resources which have the specified name and/or state. The returned data will include the task name, owner, state and status. If the task resource is in either Waiting or Running state, you can pass it to Wait-OVTaskComplete to monitor the progression and eventual final state.
Examples
Example 1
Return all the tasks with a taskState="Error"
Example 2
Return completed (successful) tasks associated with the "Server 1" Server Profile.
Example 3
Display the 10 most recent tasks from the specified appliance connection.
Parameters
-Name <String>
The name of the task resource to be returned. All names will match if omitted.
| Aliases | TaskName |
|---|---|
| Required? | False |
| Position? | Named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-InputObject <Object>
Related resource Name or Object to the task. To be used for filtering tasks specific to a resource object (i.e. Server Profile).
| Aliases | Resource |
|---|---|
| Required? | False |
| Position? | Named |
| Default value | |
| Accept pipeline input? | true (ByValue) |
| Accept wildcard characters? | False |
-ResourceCategory <String>
Specify the Resource Category to filter task results to. Cannot be combined with Resource parameter.
Some examples are:
- ethernet-networks
- fc-networks
- power-devices
- unmanaged-devices
- server-profiles
- server-hardware
- enclosures
- enclosure-groups
- interconnects
- logical-interconnects
- logical-interconnect-groups
- appliance
- firmware-drivers
| Aliases | Category |
|---|---|
| Required? | False |
| Position? | Named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-State <String>
The state of the task resource a to be returned. May be one of the following strings:
- Unknown
- New
- Running
- Suspended
- Terminated
- Killed
- Completed
- Error
- Warning
All states will match if omitted. All tasks will be returned if both names and state are omitted.
| Aliases | None |
|---|---|
| Required? | False |
| Position? | Named |
| Default value | |
| Accept pipeline input? | false |
| Accept wildcard characters? | False |
-Count <Int32>
Specify the maximum amount of task objects to return. 0 will return all found task objects.
| Aliases | None |
|---|---|
| Required? | False |
| Position? | Named |
| Default value | 0 |
| 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? | False |
| Position? | Named |
| Default value | (${Global:ConnectedSessions} | ? Default) |
| Accept pipeline input? | true (ByPropertyName) |
| 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
Resource Object to retrieve task resources of
Return Values
Single Task resource
Multiple Task resources or formatted table list of tasks