Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Approve-CMApprovalRequest

Updated: February 7, 2014

Applies To: System Center 2012 R2 Configuration Manager

Approve-CMApprovalRequest

Approves a request to allow the installation of an application.

Syntax

Parameter Set: SearchByIdMandatory
Approve-CMApprovalRequest -Id <String[]> [-Comment <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByNameMandatory
Approve-CMApprovalRequest -ApplicationName <String[]> -User <String> [-Comment <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Approve-CMApprovalRequest -InputObject <IResultObject> [-Comment <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Approve-CMApprovalRequest cmdlet approves a request from a user to install an application. You can specify an approval request by application name, application ID, or by user. You can also use the Get-CMApprovalRequest cmdlet to view approval requests.

Parameters

-ApplicationName<String[]>

Specifies an array of names of applications.


Aliases

Application

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Comment<String>

Specifies a comment about the approval of the request.


Aliases

Comments

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Id<String[]>

Specifies an array of IDs of applications.


Aliases

CIUniqueid

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<IResultObject>

Specifies an approval request object. To obtain an approval request object, use the Get-CMApprovalRequest cmdlet.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-User<String>

Specifies the name of a user who submitted the approval request. Use the format domain\user.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Approve a request for a specific application

This command approves a request from a user to install an application specified by its ID.


PS C:\> Approve-CMApprovalRequest -Id "ScopeId_2A11048C-917A-4C11-9E77-7DCC402F30EC/Application_426dfca1-0cc0-4aa3-85f8-3cd1b184d494/1"

Example 2: Approve a request for a specific user

This command approves a request for an application named Test for the specified user. The command includes a comment.


PS C:\> Approve-CMApprovalRequest -Application "Test" -User "tsqa\davidchew" -Comment "Request approved."

Example 3: Approve a request by using a variable

The first command gets an approval request for a specified application ID and stores it in the variable $Approval.

The second command accepts the request stored in $Approval. The command includes a comment.


PS C:\> $Approval = Get-CMApprovalRequest -Id "ScopeId_2A11048C-917A-4C11-9E77-7DCC402F30EC/Application_d047e945-d6af-46f4-910f-ed36c880ae06/1"
PS C:\> Approve-CMApprovalRequest -InputObject $Approval -Comment "Request approved."

Related topics

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.