Skip to content

Commit b550822

Browse files
committed
removing force param
1 parent f7cc9d6 commit b550822

File tree

3 files changed

+3
-33
lines changed

3 files changed

+3
-33
lines changed

src/Network/Network.Test/ScenarioTests/ApplicationGatewayTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ function Test-ApplicationGatewayCRUD3
877877

878878
# Next: Set Identity on an existing gateway without identity
879879
# First, Removing identity from the gateway
880-
Remove-AzApplicationGatewayIdentity -ApplicationGateway $getgw01 -Force
880+
Remove-AzApplicationGatewayIdentity -ApplicationGateway $getgw01
881881

882882
# Set Application Gateway
883883
$getgw02 = Set-AzApplicationGateway -ApplicationGateway $getgw01

src/Network/Network/ApplicationGateway/Identity/RemoveAzureApplicationGatewayIdentityCommand.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,13 @@ public class RemoveAzureApplicationGatewayIdentityCommand : NetworkBaseCmdlet
2727
HelpMessage = "The applicationGateway")]
2828
public PSApplicationGateway ApplicationGateway { get; set; }
2929

30-
[Parameter(
31-
Mandatory = false,
32-
HelpMessage = "Do not ask for confirmation.")]
33-
public SwitchParameter Force { get; set; }
34-
3530
public override void ExecuteCmdlet()
3631
{
3732
if (this.ApplicationGateway.Identity == null)
3833
{
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.");
4035
}
4136

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-
{
5237
base.ExecuteCmdlet();
5338
this.ApplicationGateway.Identity = null;
5439
WriteObject(this.ApplicationGateway);

src/Network/Network/help/Remove-AzApplicationGatewayIdentity.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Removes a identity from an application gateway.
1313
## SYNTAX
1414

1515
```
16-
Remove-AzApplicationGatewayIdentity -ApplicationGateway <PSApplicationGateway> [-Force]
16+
Remove-AzApplicationGatewayIdentity -ApplicationGateway <PSApplicationGateway>
1717
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
1818
```
1919

@@ -63,21 +63,6 @@ Accept pipeline input: False
6363
Accept wildcard characters: False
6464
```
6565
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-
8166
### -Confirm
8267
Prompts you for confirmation before running the cmdlet.
8368

0 commit comments

Comments
 (0)