共用方式為


Deny-SCOMPendingManagement

Denies pending agent management actions.

Syntax

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

Description

The Deny-SCOMPendingManagement cmdlet denies pending management actions in System Center - 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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required: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.