Get-ApprovalRequest

Description

The Get-ApprovalRequest cmdlet allows you retrieve approval requests for the current user. The cmdlet can be combined with the Set-PendingApprovalRequest to approve or reject pending approval requests.

Syntax

Get-ApprovalRequest [-Status <ApprovalStatus>]

Parameters

Status

Optional. Allows you to specify to get only Pending, Expired, Rejected, or Approved requests. When no value is specified for this parameter, all approval requests are returned

Examples

# Get all pending approvals
$obj = Get-ApprovalRequest -Status Pending

# Get all approval requests
$obj = Get-ApprovalRequest 

# Approval all pending requests
Get-ApprovalRequest -Status Pending | Set-PendingApprovalRequest -Decision Approved

Last updated