Share via


Deny-SCOMPendingManagement

Deny-SCOMPendingManagement

Denies pending agent management actions.

Syntax

Parameter Set: FromAgentPendingAction
Deny-SCOMPendingManagement [-PendingAction] <AgentPendingAction[]> [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Deny-SCOMPendingManagement cmdlet denies pending management actions in System Center 2012 – Operations Manager.

Parameters

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PendingAction<AgentPendingAction[]>

Specifies an array of pending actions to deny. For information about how to get a pending action object, type Get-Help Get-SCOMPendingManagement.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

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

  • Microsoft.EnterpriseManagement.Administration.AgentPendingAction

    This object represents a task that targets an agent on a managed computer. The task is queued or awaiting administrator approval.

Outputs

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

Examples

Example 1: Deny pending management entries

This command retrieves a list of agent management entries that are pending with an action of ManualApproval, and passes the output to the Deny-SCOMPendingManagement cmdlet by pipeline operator. This command also uses the WhatIf parameter to display what action would occur if the command was implemented. In this case, all targets with a pending action of ManualApproval would be denied.

PS C:\> Get-SCOMPendingManagement | where {$_.AgentPendingActionType -eq "ManualApproval"} | Deny-SCOMPendingManagement -WhatIf

Approve-SCOMPendingManagement

Get-SCOMPendingManagement