Skip to content

Commit 9ddcad0

Browse files
authored
Update PS command documentation (#14663)
1 parent ecae5bb commit 9ddcad0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/Network/Network/help/Set-AzVirtualNetworkGateway.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,28 @@ The third command assigns the address list into addresslist1.
265265
The fourth command created a PSIpConfigurationBgpPeeringAddress object.
266266
The fifth command set this new created PSIpConfigurationBgpPeeringAddress to IpConfigurationBgpPeeringAddresses and update the gateway.
267267

268+
### Example 6: Delete multiple expired VpnClientRootCertificates of an existing virtual network gateway
269+
```
270+
PS C:\>$Gateway=Get-Azvirtualnetworkgateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
271+
272+
PS C:\>$rootCerts=$Gateway.VpnClientConfiguration.VpnClientRootCertificates
273+
274+
PS C:\>$rootCerts.Count
275+
PS C:\>$rootCerts[0]
276+
PS C:\>$rootCerts[1]
277+
PS C:\>$rootCerts.Remove($rootCerts[1])
278+
279+
PS C:\>$Gateway1 = Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -VpnClientRootCertificates $rootCerts
280+
281+
```
282+
283+
The first command gets a virtual network gateway named Gateway01 that belongs to resource group ResourceGroup001 and stores it to the variable named $Gateway
284+
The second command gets all the root certificates on VirtualNetworkGateway and save it to another variable $rootCerts
285+
The third command shows total existing root certs on VirtualNetworkGateway.
286+
The forth & fifth commands print root certificates at those corresponding indices for customer to see which ones they want to delete.
287+
The sixth command removes expired root certificate by using that index e.g. here 1. Repeat same steps to remove multiple expired certificates from variable: $rootCerts
288+
The seventh command updates VirtualNetworkGateway to set valid root certificates i.e. certificates that exists in variable: $rootCerts
289+
268290
## PARAMETERS
269291

270292
### -AadAudienceId

0 commit comments

Comments
 (0)