File tree Expand file tree Collapse file tree 3 files changed +3
-33
lines changed
ApplicationGateway/Identity
Network.Test/ScenarioTests Expand file tree Collapse file tree 3 files changed +3
-33
lines changed Original file line number Diff line number Diff line change @@ -877,7 +877,7 @@ function Test-ApplicationGatewayCRUD3
877
877
878
878
# Next: Set Identity on an existing gateway without identity
879
879
# First, Removing identity from the gateway
880
- Remove-AzApplicationGatewayIdentity - ApplicationGateway $getgw01 - Force
880
+ Remove-AzApplicationGatewayIdentity - ApplicationGateway $getgw01
881
881
882
882
# Set Application Gateway
883
883
$getgw02 = Set-AzApplicationGateway - ApplicationGateway $getgw01
Original file line number Diff line number Diff line change @@ -27,28 +27,13 @@ public class RemoveAzureApplicationGatewayIdentityCommand : NetworkBaseCmdlet
27
27
HelpMessage = "The applicationGateway" ) ]
28
28
public PSApplicationGateway ApplicationGateway { get ; set ; }
29
29
30
- [ Parameter (
31
- Mandatory = false ,
32
- HelpMessage = "Do not ask for confirmation." ) ]
33
- public SwitchParameter Force { get ; set ; }
34
-
35
30
public override void ExecuteCmdlet ( )
36
31
{
37
32
if ( this . ApplicationGateway . Identity == null )
38
33
{
39
- throw new ArgumentException ( "Gateway doesn't have an identity assigned to it." ) ;
34
+ throw new ArgumentException ( "Application Gateway doesn't have an identity assigned to it." ) ;
40
35
}
41
36
42
- ConfirmAction (
43
- Force . IsPresent ,
44
- "Are you sure you want to remove Identity" ,
45
- "Removing Identity.." ,
46
- ApplicationGateway . Identity . ToString ( ) ,
47
- ( ) => RemoveIdentity ( ) ) ;
48
- }
49
-
50
- private void RemoveIdentity ( )
51
- {
52
37
base . ExecuteCmdlet ( ) ;
53
38
this . ApplicationGateway . Identity = null ;
54
39
WriteObject ( this . ApplicationGateway ) ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ Removes a identity from an application gateway.
13
13
## SYNTAX
14
14
15
15
```
16
- Remove-AzApplicationGatewayIdentity -ApplicationGateway <PSApplicationGateway> [-Force]
16
+ Remove-AzApplicationGatewayIdentity -ApplicationGateway <PSApplicationGateway>
17
17
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
18
18
```
19
19
@@ -63,21 +63,6 @@ Accept pipeline input: False
63
63
Accept wildcard characters : False
64
64
` ` `
65
65
66
- ### -Force
67
- Do not ask for confirmation.
68
-
69
- ` ` ` yaml
70
- Type : System.Management.Automation.SwitchParameter
71
- Parameter Sets : (All)
72
- Aliases :
73
-
74
- Required : False
75
- Position : Named
76
- Default value : None
77
- Accept pipeline input : False
78
- Accept wildcard characters : False
79
- ` ` `
80
-
81
66
### -Confirm
82
67
Prompts you for confirmation before running the cmdlet.
83
68
You can’t perform that action at this time.
0 commit comments