編輯

共用方式為


Remove-PswaAuthorizationRule

Removes a specified authorization rule from Windows PowerShell® Web Access.

Syntax

Remove-PswaAuthorizationRule
      [-Id] <Int32[]>
      [-Force]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-PswaAuthorizationRule
      [-Rule] <PswaAuthorizationRule[]>
      [-Force]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Removes a specified authorization rule from Windows PowerShell Web Access.

Examples

EXAMPLE 1

PS C:\> Remove-PswaAuthorizationRule -Id 2

This example removes the authorization rule with an ID of 2.

EXAMPLE 2

PS C:\> Get-PswaAuthorizationRule | Remove-PswaAuthorizationRule -Confirm

This example removes all authorization rules and also requires confirmation by the user.

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

-Force

Runs the cmdlet without prompting for confirmation. By default the cmdlet asks for confirmation before proceeding.

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

-Id

Specifies the identifiers (IDs) of one or more rules to remove.

Type:Int32[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Rule

Specifies the rules to remove.

Type:PswaAuthorizationRule[]
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

int[], PswaAuthorizationRule[]

This cmdlet accepts either an array of integers or an array of PswaAuthorizationRule objects.

Outputs

None