Deny-SCOMPendingManagement

Denies pending agent management actions.

Syntax

Deny-SCOMPendingManagement [-PendingAction] <AgentPendingAction[]> [-PassThru] [-Confirm] [-WhatIf]
 [<CommonParameters>]

Description

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

Examples

Example 1: Deny pending management entries

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

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 using the pipeline operator. By using the WhatIf parameter, the cmdlet displays what action would occur if the command was implemented. In this case, all targets with a pending action of ManualApproval would be denied.

Parameters

-PendingAction

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

Type:AgentPendingAction[]
Required:True
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-PassThru

Indicates that the cmdlet creates or modifies an object that a command can use in the pipeline. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
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.

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.EnterpriseManagement.Administration.AgentPendingAction

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