diff --git a/src/Network/Network/help/Add-AzApplicationGatewayBackendAddressPool.md b/src/Network/Network/help/Add-AzApplicationGatewayBackendAddressPool.md index 4c7f7758a1f9..f2c19153a778 100644 --- a/src/Network/Network/help/Add-AzApplicationGatewayBackendAddressPool.md +++ b/src/Network/Network/help/Add-AzApplicationGatewayBackendAddressPool.md @@ -36,7 +36,7 @@ The first command gets the application gateway named ApplicationGateway01 in the ### Example 2: Add a back-end address pool by using backend server IP addresses ```powershell $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01" -$AppGw = Add-AzApplicationGatewayBackendAddressPool -ApplicationGateway $ AppGw -Name "Pool02" -BackendIPAddresses "10.10.10.10", "10.10.10.11" +$AppGw = Add-AzApplicationGatewayBackendAddressPool -ApplicationGateway $AppGw -Name "Pool02" -BackendIPAddresses "10.10.10.10", "10.10.10.11" ``` The first command gets the application gateway named ApplicationGateway01 in the resource group named ResourceGroup01, and stores it in the $AppGw variable.The second command adds the back-end address pool of the application gateway stored in $AppGw by using IP addresses. diff --git a/src/Network/Network/help/Add-AzApplicationGatewayCustomError.md b/src/Network/Network/help/Add-AzApplicationGatewayCustomError.md index 534435ff5f54..358218b1e7e1 100644 --- a/src/Network/Network/help/Add-AzApplicationGatewayCustomError.md +++ b/src/Network/Network/help/Add-AzApplicationGatewayCustomError.md @@ -26,7 +26,7 @@ The **Add-AzApplicationGatewayCustomError** cmdlet adds a custom error to an app ```powershell $resourceGroupName = "resourceGroupName" $AppGWName = "applicationGatewayName" -$AppGw = Get-AzApplicationGateway -Name $AppGWName -ResourceGroup $resourceGroupName +$AppGw = Get-AzApplicationGateway -Name $AppGWName -ResourceGroupName $resourceGroupName $customError502Url = "https://mycustomerrorpages.blob.core.windows.net/errorpages/502.htm" $updatedgateway = Add-AzApplicationGatewayCustomError -ApplicationGateway $AppGw -StatusCode HttpStatus502 -CustomErrorPageUrl $customError502Url Set-AzApplicationGateway -ApplicationGateway $AppGw diff --git a/src/Network/Network/help/Add-AzApplicationGatewayTrustedRootCertificate.md b/src/Network/Network/help/Add-AzApplicationGatewayTrustedRootCertificate.md index 8f13a7713318..1ba8f5a133bc 100644 --- a/src/Network/Network/help/Add-AzApplicationGatewayTrustedRootCertificate.md +++ b/src/Network/Network/help/Add-AzApplicationGatewayTrustedRootCertificate.md @@ -26,7 +26,7 @@ The **Add-AzApplicationGatewayTrustedRootCertificate** cmdlet adds a trusted roo ```powershell $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName $gw = Add-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName -CertificateFile ".\rootCA.cer" -$gw = Add-AzApplicationGatewayBackendHttpSettings -ApplicationGateway $gw -Name $poolSetting01Name -Port 443 -Protocol Https -CookieBasedAffinity Enabled -PickHostNameFromBackendAddress -TrustedRootCertificate $gw.TrustedRootCertificates[0] +$gw = Add-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $gw -Name $poolSetting01Name -Port 443 -Protocol Https -CookieBasedAffinity Enabled -PickHostNameFromBackendAddress -TrustedRootCertificate $gw.TrustedRootCertificates[0] $gw = Set-AzApplicationGateway -ApplicationGateway $gw ``` diff --git a/src/Network/Network/help/Add-AzApplicationGatewayUrlPathMapConfig.md b/src/Network/Network/help/Add-AzApplicationGatewayUrlPathMapConfig.md index 1be9a4bd453e..b3cf35f96a19 100644 --- a/src/Network/Network/help/Add-AzApplicationGatewayUrlPathMapConfig.md +++ b/src/Network/Network/help/Add-AzApplicationGatewayUrlPathMapConfig.md @@ -55,7 +55,7 @@ The **Add-AzApplicationGatewayUrlPathMapConfig** cmdlet adds an array of URL pat ```powershell $appgw = Get-AzApplicationGateway -ResourceGroupName "rg" -Name "appGwName" $pool = Get-AzApplicationGatewayBackendAddressPool -ApplicationGateway $appgw -Name "pool01" -$poolSettings = Get-AzApplicationGatewayBackendHttpSettings -ApplicationGateway $appgw -Name "poolSettings01" +$poolSettings = Get-AzApplicationGatewayBackendHttpSetting -ApplicationGateway $appgw -Name "poolSettings01" $pathRule = New-AzApplicationGatewayPathRuleConfig -Name "rule01" -Paths "/path" -BackendAddressPool $pool -BackendHttpSettings $poolSettings $appgw = Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway $appgw -Name "url01" -PathRules $pathRule -DefaultBackendAddressPool $pool -DefaultBackendHttpSettings $poolSettings $appgw = Set-AzApplicationGateway -ApplicationGateway $appgw diff --git a/src/Network/Network/help/Add-AzDelegation.md b/src/Network/Network/help/Add-AzDelegation.md index 9541c2018ebc..60b3574d5a55 100644 --- a/src/Network/Network/help/Add-AzDelegation.md +++ b/src/Network/Network/help/Add-AzDelegation.md @@ -27,7 +27,7 @@ The **Add-AzDelegation** cmdlet adds a service delegation to an Azure subnet. $vnet = Get-AzVirtualNetwork -Name "myVNet" -ResourceGroupName "myResourceGroup" $subnet = Get-AzVirtualNetworkSubnetConfig -Name "mySubnet" -VirtualNetwork $vnet $subnet = Add-AzDelegation -Name "myDelegation" -ServiceName "Microsoft.Sql/servers" -Subnet $subnet -Set-AzVirtualNetwork $vnet +Set-AzVirtualNetwork -VirtualNetwork $vnet ``` The first command retrieves the virtual network on which the subnet lies. The second command isolates out the subnet of interest - the one which you want to delegate. The third command adds a delegation to the subnet. This particular example would be useful when you want to enable SQL to create interface endpoints in this subnet. The final command sends the updated subnet to the server to actually update your subnet. diff --git a/src/Network/Network/help/Add-AzExpressRouteCircuitAuthorization.md b/src/Network/Network/help/Add-AzExpressRouteCircuitAuthorization.md index 3fb3b3308d8c..91c1c6c74cd1 100644 --- a/src/Network/Network/help/Add-AzExpressRouteCircuitAuthorization.md +++ b/src/Network/Network/help/Add-AzExpressRouteCircuitAuthorization.md @@ -39,7 +39,7 @@ enabled for use. ### Example 1: Add an authorization to the specified ExpressRoute circuit ```powershell $Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup" -Add-AzExpressRouteCircuitAuthorization -Name "ContosoCircuitAuthorization" -Circuit $Circuit +Add-AzExpressRouteCircuitAuthorization -Name "ContosoCircuitAuthorization" -ExpressRouteCircuit $Circuit Set-AzExpressRouteCircuit -ExpressRouteCircuit $Circuit ``` diff --git a/src/Network/Network/help/Add-AzServiceEndpointPolicyDefinition.md b/src/Network/Network/help/Add-AzServiceEndpointPolicyDefinition.md index bd68c550c692..99a1d5540890 100644 --- a/src/Network/Network/help/Add-AzServiceEndpointPolicyDefinition.md +++ b/src/Network/Network/help/Add-AzServiceEndpointPolicyDefinition.md @@ -25,7 +25,7 @@ The **Add-AzServiceEndpointPolicyDefinition** cmdlet add a service endpoint poli ### Example 1: Updates a service endpoint policy definition in a service endpoint policy ```powershell -$policydef= New-AzServiceEndpointPolicyDefinition -Name "ServiceEndpointPolicyDefinition1" -ResourceGroupName "ResourceGroup01" -Service "Microsoft.Storage" -ServiceResources "subscriptions/sub1" -Description "New Definition" +New-AzServiceEndpointPolicyDefinition -Name "ServiceEndpointPolicyDefinition1" -Service "Microsoft.Storage" -ServiceResource "subscriptions/sub1" -Description "New Definition" ``` This command updated the service endpoint policy definition with name ServiceEndpointPolicyDefinition1, service Microsoft.Storage, service resources subscriptions/sub1 and diff --git a/src/Network/Network/help/Add-AzVirtualRouterPeer.md b/src/Network/Network/help/Add-AzVirtualRouterPeer.md index b45849f3d1c0..aa9bb9e4e599 100644 --- a/src/Network/Network/help/Add-AzVirtualRouterPeer.md +++ b/src/Network/Network/help/Add-AzVirtualRouterPeer.md @@ -25,7 +25,7 @@ The **Add-AzVirtualRouterPeer** cmdlet adds a VirtualRouter Peer to an Azure Vir ### Example 1 ```powershell -Add-AzVirtualRouterPeer 1ResourceGroupName virtualRouterRG -PeerName csr -PeerIp 10.0.1.5 -PeerAsn 63000 -VirtualRouterName virtualRouter +Add-AzVirtualRouterPeer -ResourceGroupName virtualRouterRG -PeerName csr -PeerIp 10.0.1.5 -PeerAsn 63000 -VirtualRouterName virtualRouter ``` ## PARAMETERS diff --git a/src/Network/Network/help/Get-AzApplicationGatewayAvailableServerVariableAndHeader.md b/src/Network/Network/help/Get-AzApplicationGatewayAvailableServerVariableAndHeader.md index 3224f062a312..593295704062 100644 --- a/src/Network/Network/help/Get-AzApplicationGatewayAvailableServerVariableAndHeader.md +++ b/src/Network/Network/help/Get-AzApplicationGatewayAvailableServerVariableAndHeader.md @@ -45,7 +45,7 @@ This commands returns all the available response headers. ### Example 4 ```powershell -Get-AzApplicationGatewayAvailableServerVariableAndHeader - ServerVariable -RequestHeader -ResponseHeader +Get-AzApplicationGatewayAvailableServerVariableAndHeader -ServerVariable -RequestHeader -ResponseHeader ``` This commands returns all the available server variables, request and response headers. diff --git a/src/Network/Network/help/Get-AzApplicationGatewayConnectionDraining.md b/src/Network/Network/help/Get-AzApplicationGatewayConnectionDraining.md index 3c043712fc14..7f2a06a2f60f 100644 --- a/src/Network/Network/help/Get-AzApplicationGatewayConnectionDraining.md +++ b/src/Network/Network/help/Get-AzApplicationGatewayConnectionDraining.md @@ -25,7 +25,7 @@ The **Get-AzApplicationGatewayConnectionDraining** cmdlet gets the connection dr ### Example 1 ```powershell $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01" -$Settings = Get-AzApplicationGatewayBackendHttpSettings -Name "Settings01" -ApplicationGateway $AppGw +$Settings = Get-AzApplicationGatewayBackendHttpSetting -Name "Settings01" -ApplicationGateway $AppGw $ConnectionDraining = Get-AzApplicationGatewayConnectionDraining -BackendHttpSettings $Settings ``` diff --git a/src/Network/Network/help/Get-AzApplicationGatewayHttpListenerCustomError.md b/src/Network/Network/help/Get-AzApplicationGatewayHttpListenerCustomError.md index e64447d9017e..be212accef3b 100644 --- a/src/Network/Network/help/Get-AzApplicationGatewayHttpListenerCustomError.md +++ b/src/Network/Network/help/Get-AzApplicationGatewayHttpListenerCustomError.md @@ -25,14 +25,14 @@ The **Get-AzApplicationGatewayCustomError** cmdlet gets custom error(s) from a h ### Example 1: Gets a custom error in a http listener ```powershell -$ce = Get-AzApplicationGatewayCustomError -HttpListener $listener01 -StatusCode HttpStatus502 +$ce = Get-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 -StatusCode HttpStatus502 ``` This command gets and returns the custom error of http status code 502 from the http listener $listener01. ### Example 2: Gets the list of all custom errors in a http listener ```powershell -$ces = Get-AzApplicationGatewayCustomError -HttpListener $listener01 +$ces = Get-AzApplicationGatewayHttpListenerCustomError -HttpListener $listener01 ``` This command gets and returns the list of all custom errors from the http listener $listener01. diff --git a/src/Network/Network/help/Get-AzApplicationGatewayTrustedRootCertificate.md b/src/Network/Network/help/Get-AzApplicationGatewayTrustedRootCertificate.md index 987f3fa13662..4f22b94eb186 100644 --- a/src/Network/Network/help/Get-AzApplicationGatewayTrustedRootCertificate.md +++ b/src/Network/Network/help/Get-AzApplicationGatewayTrustedRootCertificate.md @@ -25,7 +25,7 @@ The **Get-AzApplicationGatewayTrustedRootCertificate** cmdlet gets Trusted Root ### Example 1 ```powershell $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName -$trustedRootCert = Get-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName --CertificateFile ".\rootCA.cer" +$trustedRootCert = Get-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName -CertificateFile ".\rootCA.cer" ``` The first command gets the Application Gateway and stores it in $gw variable. diff --git a/src/Network/Network/help/Get-AzExpressRouteCircuitAuthorization.md b/src/Network/Network/help/Get-AzExpressRouteCircuitAuthorization.md index 7027e426a169..6c032982d49f 100644 --- a/src/Network/Network/help/Get-AzExpressRouteCircuitAuthorization.md +++ b/src/Network/Network/help/Get-AzExpressRouteCircuitAuthorization.md @@ -33,7 +33,7 @@ well as other information about the authorization, can be viewed at any time by ### Example 1: Get all ExpressRoute authorizations ```powershell $Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup" -Get-AzExpressRouteCircuitAuthorization -Circuit $Circuit +Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $Circuit ``` These commands return information about all the ExpressRoute authorizations associated with an @@ -46,7 +46,7 @@ authorizations associated with ContosoCircuit. ### Example 2: Get all ExpressRoute authorizations using the Where-Object cmdlet ```powershell $Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup" - Get-AzExpressRouteCircuitAuthorization -Circuit $Circuit | Where-Object {$_.AuthorizationUseStatus -eq "Available"} + Get-AzExpressRouteCircuitAuthorization -ExpressRouteCircuit $Circuit | Where-Object {$_.AuthorizationUseStatus -eq "Available"} ``` These commands represent a variation on the commands used in Example 1. In this case, however, diff --git a/src/Network/Network/help/Get-AzExpressRouteConnection.md b/src/Network/Network/help/Get-AzExpressRouteConnection.md index 8950c3f2db10..df1caf0d9273 100644 --- a/src/Network/Network/help/Get-AzExpressRouteConnection.md +++ b/src/Network/Network/help/Get-AzExpressRouteConnection.md @@ -47,8 +47,8 @@ $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Na Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit $ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300 $ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit $ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id -New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 -Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" +New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 +Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection" ``` ```output @@ -88,7 +88,7 @@ Then it gets the connection using the connection name. ### Example 2 ```powershell -Get-AzExpressRouteConnection -ResourceGroupName ps9361 -ParentResourceName testExpressRoutegw -Name test* +Get-AzExpressRouteConnection -ResourceGroupName ps9361 -ExpressRouteGatewayName testExpressRoutegw -Name test* ``` ```output diff --git a/src/Network/Network/help/Get-AzExpressRouteCrossConnectionArpTable.md b/src/Network/Network/help/Get-AzExpressRouteCrossConnectionArpTable.md index 867faf96716b..0fb1c6c5cd57 100644 --- a/src/Network/Network/help/Get-AzExpressRouteCrossConnectionArpTable.md +++ b/src/Network/Network/help/Get-AzExpressRouteCrossConnectionArpTable.md @@ -36,7 +36,7 @@ a particular peering. You can use the ARP table to validate layer 2 configuratio ### Example 1: Display the ARP table for an ExpressRoute peer ```powershell -Get-AzExpressRouteCrossConnectionARPTable -ResourceGroupName $RG -ExpressRouteCrossConnectionName $CrossConnectionName -PeeringType MicrosoftPeering -DevicePath Primary +Get-AzExpressRouteCrossConnectionARPTable -ResourceGroupName $RG -CrossConnectionName $CrossConnectionName -PeeringType MicrosoftPeering -DevicePath Primary ``` ## PARAMETERS diff --git a/src/Network/Network/help/Get-AzExpressRouteCrossConnectionRouteTable.md b/src/Network/Network/help/Get-AzExpressRouteCrossConnectionRouteTable.md index 306c1dc22b7c..a2111c15805e 100644 --- a/src/Network/Network/help/Get-AzExpressRouteCrossConnectionRouteTable.md +++ b/src/Network/Network/help/Get-AzExpressRouteCrossConnectionRouteTable.md @@ -37,7 +37,7 @@ connectivity. ### Example 1: Display the route table for the primary path ```powershell -Get-AzExpressRouteCrossConnectionRouteTable -ResourceGroupName $RG -ExpressRouteCrossConnectionName $CircuitName -DevicePath 'Primary' +Get-AzExpressRouteCrossConnectionRouteTable -ResourceGroupName $RG -CrossConnectionName $CircuitName -PeeringType MicrosoftPeering -DevicePath Primary ``` ## PARAMETERS diff --git a/src/Network/Network/help/Get-AzExpressRouteCrossConnectionRouteTableSummary.md b/src/Network/Network/help/Get-AzExpressRouteCrossConnectionRouteTableSummary.md index 973c61a073c0..decd8e5bc943 100644 --- a/src/Network/Network/help/Get-AzExpressRouteCrossConnectionRouteTableSummary.md +++ b/src/Network/Network/help/Get-AzExpressRouteCrossConnectionRouteTableSummary.md @@ -37,7 +37,7 @@ router. ### Example 1: Display the route summary for the primary path ```powershell -Get-AzExpressRouteCrossConnectionRouteTableSummary -ResourceGroupName $RG -ExpressRouteCrossConnectionName $CrossConnectionName -DevicePath 'Primary' +Get-AzExpressRouteCrossConnectionRouteTableSummary -ResourceGroupName $RG -CrossConnectionName $CrossConnectionName -PeeringType MicrosoftPeering -DevicePath Primary ``` ## PARAMETERS diff --git a/src/Network/Network/help/Get-AzNetworkInterfaceTapConfig.md b/src/Network/Network/help/Get-AzNetworkInterfaceTapConfig.md index 247b74f62425..6e0efa5ea81c 100644 --- a/src/Network/Network/help/Get-AzNetworkInterfaceTapConfig.md +++ b/src/Network/Network/help/Get-AzNetworkInterfaceTapConfig.md @@ -31,21 +31,21 @@ The **Get-AzNetworkInterfaceTapConfig** cmdlet gets an Azure Tap Configuration f ### Example 1: Get all tap configurations for a given network interface ```powershell -Get-AzNetworkInterfaceTapConfig -ResourceGroupName "ResourceGroup1" -NetworkInterface "sourceNicName" +Get-AzNetworkInterfaceTapConfig -ResourceGroupName "ResourceGroup1" -NetworkInterfaceName "sourceNicName" ``` This command gets tap configurations added for the given network interface. ### Example 2: Get a given tap configuration ```powershell -Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -NetworkInterface "sourceNicName" -Name "tapconfigName" +Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -NetworkInterfaceName "sourceNicName" -Name "tapconfigName" ``` This command gets specific tap configuration added for the given network interface. ### Example 3: Get a given tap configuration ```powershell -Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -NetworkInterface "sourceNicName" -Name "tapconfig*" +Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -NetworkInterfaceName "sourceNicName" -Name "tapconfig*" ``` This command gets tap configurations added for the given network interface with name starting with "tapconfig". diff --git a/src/Network/Network/help/Get-AzNetworkWatcher.md b/src/Network/Network/help/Get-AzNetworkWatcher.md index 2c96c464c317..e6b761dc6ec9 100644 --- a/src/Network/Network/help/Get-AzNetworkWatcher.md +++ b/src/Network/Network/help/Get-AzNetworkWatcher.md @@ -30,7 +30,7 @@ The Get-AzNetworkWatcher cmdlet gets one or more Azure Network Watcher resources ### Example 1: Get a Network Watcher ```powershell -Get-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroup NetworkWatcherRG +Get-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroupName NetworkWatcherRG ``` ```output diff --git a/src/Network/Network/help/Get-AzNetworkWatcherNextHop.md b/src/Network/Network/help/Get-AzNetworkWatcherNextHop.md index cece90b87e2f..d12bd3894070 100644 --- a/src/Network/Network/help/Get-AzNetworkWatcherNextHop.md +++ b/src/Network/Network/help/Get-AzNetworkWatcherNextHop.md @@ -41,10 +41,10 @@ Next hop allows you to view the type of Azure resource, the associated IP addres ### Example 1: Get the Next Hop when communicating with an Internet IP ```powershell -$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } +$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } $networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName $VM = Get-AzVM -ResourceGroupName ContosoResourceGroup -Name VM0 -$Nics = Get-AzNetworkInterface | Where {$_.Id -eq $vm.NetworkProfile.NetworkInterfaces.Id.ForEach({$_})} +$Nics = Get-AzNetworkInterface | Where-Object {$_.Id -eq $vm.NetworkProfile.NetworkInterfaces.Id.ForEach({$_})} Get-AzNetworkWatcherNextHop -NetworkWatcher $networkWatcher -TargetVirtualMachineId $VM.Id -SourceIPAddress $nics[0].IpConfigurations[0].PrivateIpAddress -DestinationIPAddress 204.79.197.200 ``` diff --git a/src/Network/Network/help/Get-AzNetworkWatcherPacketCapture.md b/src/Network/Network/help/Get-AzNetworkWatcherPacketCapture.md index 7034be309c38..6a12d56840ed 100644 --- a/src/Network/Network/help/Get-AzNetworkWatcherPacketCapture.md +++ b/src/Network/Network/help/Get-AzNetworkWatcherPacketCapture.md @@ -37,14 +37,14 @@ The Get-AzNetworkWatcherPacketCapture gets the properties and status of a packet ### Example 1: Create a Packet Capture with multiple filters and retrieve its status ```powershell -$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } +$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } $networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName $storageAccount = Get-AzStorageAccount -ResourceGroupName contosoResourceGroup -Name contosostorage123 $filter1 = New-AzPacketCaptureFilterConfig -Protocol TCP -RemoteIPAddress "1.1.1.1-255.255.255" -LocalIPAddress "10.0.0.3" -LocalPort "1-65535" -RemotePort "20;80;443" $filter2 = New-AzPacketCaptureFilterConfig -Protocol UDP -New-AzNetworkWatcherPacketCapture -NetworkWatcher $networkWatcher -TargetVirtualMachineId $vm.Id -PacketCaptureName "PacketCaptureTest" -StorageAccountId $storageAccount.id -TimeLimitInSeconds 60 -Filters $filter1, $filter2 +New-AzNetworkWatcherPacketCapture -NetworkWatcher $networkWatcher -TargetVirtualMachineId $vm.Id -PacketCaptureName "PacketCaptureTest" -StorageAccountId $storageAccount.id -TimeLimitInSeconds 60 -Filter $filter1, $filter2 Get-AzNetworkWatcherPacketCapture -NetworkWatcher $networkWatcher -PacketCaptureName "PacketCaptureTest" ``` diff --git a/src/Network/Network/help/Get-AzNetworkWatcherSecurityGroupView.md b/src/Network/Network/help/Get-AzNetworkWatcherSecurityGroupView.md index 4bca98d42f0d..e4632007e25a 100644 --- a/src/Network/Network/help/Get-AzNetworkWatcherSecurityGroupView.md +++ b/src/Network/Network/help/Get-AzNetworkWatcherSecurityGroupView.md @@ -37,7 +37,7 @@ The Get-AzNetworkWatcherSecurityGroupView enables you to view the configured and ### Example 1: Make a Security Group View call on a VM ```powershell -$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } +$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } $networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName $VM = Get-AzVM -ResourceGroupName ContosoResourceGroup -Name VM0 Get-AzNetworkWatcherSecurityGroupView -NetworkWatcher $networkWatcher -TargetVirtualMachineId $VM.Id diff --git a/src/Network/Network/help/Get-AzNetworkWatcherTopology.md b/src/Network/Network/help/Get-AzNetworkWatcherTopology.md index 3aa0504497f0..f332baeb265f 100644 --- a/src/Network/Network/help/Get-AzNetworkWatcherTopology.md +++ b/src/Network/Network/help/Get-AzNetworkWatcherTopology.md @@ -38,7 +38,7 @@ Note: If resources from multiple regions reside in the resource group, only the ### Example 1: Get an Azure Topology ```powershell -$networkWatcher = Get-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroup NetworkWatcherRG +$networkWatcher = Get-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroupName NetworkWatcherRG Get-AzNetworkWatcherTopology -NetworkWatcher $networkWatcher -ResourceGroupName testresourcegroup ``` diff --git a/src/Network/Network/help/Get-AzNetworkWatcherTroubleshootingResult.md b/src/Network/Network/help/Get-AzNetworkWatcherTroubleshootingResult.md index 01afd9a7e538..de8ba96f680c 100644 --- a/src/Network/Network/help/Get-AzNetworkWatcherTroubleshootingResult.md +++ b/src/Network/Network/help/Get-AzNetworkWatcherTroubleshootingResult.md @@ -38,7 +38,7 @@ If the troubleshooting operation is currently in progress, then this operation m ### Example 1: Start Troubleshooting on a Virtual Network Gateway and Retrieve Result ```powershell -$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } +$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } $networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName $target = '/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{vnetGatewayName}' diff --git a/src/Network/Network/help/Get-AzRouteServerPeerAdvertisedRoute.md b/src/Network/Network/help/Get-AzRouteServerPeerAdvertisedRoute.md index 39819bdfb758..080d8f708c16 100644 --- a/src/Network/Network/help/Get-AzRouteServerPeerAdvertisedRoute.md +++ b/src/Network/Network/help/Get-AzRouteServerPeerAdvertisedRoute.md @@ -31,13 +31,13 @@ Given A route server peer either by name or by object, enumerate routes being ad ### Example 1 ```powershell -Get-AzRouteServerPeerAdvertisedRouter -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName +Get-AzRouteServerPeerAdvertisedRoute -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName ``` ### Example 2 ```powershell $routeServerPeer = Get-AzRouteServerPeer -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName -Get-AzRouteServerPeerAdvertisedRouter -InputObject $routeServerPeer +Get-AzRouteServerPeerAdvertisedRoute -InputObject $routeServerPeer ``` ## PARAMETERS diff --git a/src/Network/Network/help/Get-AzRouteServerPeerLearnedRoute.md b/src/Network/Network/help/Get-AzRouteServerPeerLearnedRoute.md index 344d1dd4e3a7..0fe57c094880 100644 --- a/src/Network/Network/help/Get-AzRouteServerPeerLearnedRoute.md +++ b/src/Network/Network/help/Get-AzRouteServerPeerLearnedRoute.md @@ -31,13 +31,13 @@ Enumerate routes learned by a route server peer from other sources. ### Example 1 ```powershell -Get-AzRouteServerPeerLearnedRouter -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName +Get-AzRouteServerPeerLearnedRoute -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName ``` ### Example 2 ```powershell $routerServerPeer = Get-AzRouteServerPeer -ResourceGroupName $resourceGroupName -RouteServerName $routeServerName -PeerName $peerName -Get-AzRouteServerPeerLearnedRouter -InputObject $routerServerPeer +Get-AzRouteServerPeerLearnedRoute -InputObject $routerServerPeer ``` ## PARAMETERS diff --git a/src/Network/Network/help/Get-AzVirtualNetworkGatewayNatRule.md b/src/Network/Network/help/Get-AzVirtualNetworkGatewayNatRule.md index 154035a23e5e..895b524f35d3 100644 --- a/src/Network/Network/help/Get-AzVirtualNetworkGatewayNatRule.md +++ b/src/Network/Network/help/Get-AzVirtualNetworkGatewayNatRule.md @@ -37,7 +37,7 @@ Get-AzVirtualNetworkGatewayNatRule -ParentResourceId [-Name ] ### Example 1 ```powershell -get-azVirtualNetworkGatewayNatRule -ResourceGroupName "rg1" -Name "natRule1" -ParentResourceName gw1 +Get-AzVirtualNetworkGatewayNatRule -ResourceGroupName "rg1" -Name "natRule1" -ParentResourceName gw1 ``` ```output @@ -62,7 +62,7 @@ Etag : W/"5150d788-e165-42ba-99c4-8138a545fce9" ### Example 2: ```powershell -get-azVirtualNetworkGatewayNatRule -ResourceGroupName "rg1" -ParentResourceName "gw1" +Get-AzVirtualNetworkGatewayNatRule -ResourceGroupName "rg1" -ParentResourceName "gw1" ``` ```output diff --git a/src/Network/Network/help/Get-AzVirtualNetworkPeering.md b/src/Network/Network/help/Get-AzVirtualNetworkPeering.md index 2509426dc12d..7812945eec6c 100644 --- a/src/Network/Network/help/Get-AzVirtualNetworkPeering.md +++ b/src/Network/Network/help/Get-AzVirtualNetworkPeering.md @@ -27,14 +27,14 @@ The **Get-AzVirtualNetworkPeering** cmdlet gets the virtual network peering. ```powershell # Get virtual network peering named myVnet1TomyVnet2 located in myVirtualNetwork in the resource group named myResourceGroup. -Get-AzVirtualNetworkPeering -Name "myVnet1TomyVnet2" -VirtualNetwork "myVnet" -ResourceGroupName "myResourceGroup" +Get-AzVirtualNetworkPeering -Name "myVnet1TomyVnet2" -VirtualNetworkName "myVnet" -ResourceGroupName "myResourceGroup" ``` ### Example 2: Get all peerings in virtual network ```powershell # Get all virtual network peerings located in myVirtualNetwork in the resource group named myResourceGroup. -Get-AzVirtualNetworkPeering -Name "myVnet1To*" -VirtualNetwork "myVnet" -ResourceGroupName "myResourceGroup" +Get-AzVirtualNetworkPeering -Name "myVnet1To*" -VirtualNetworkName "myVnet" -ResourceGroupName "myResourceGroup" ``` ## PARAMETERS diff --git a/src/Network/Network/help/Get-AzVirtualRouterPeerAdvertisedRoute.md b/src/Network/Network/help/Get-AzVirtualRouterPeerAdvertisedRoute.md index bd1bb8ff3459..93bee2248b39 100644 --- a/src/Network/Network/help/Get-AzVirtualRouterPeerAdvertisedRoute.md +++ b/src/Network/Network/help/Get-AzVirtualRouterPeerAdvertisedRoute.md @@ -31,13 +31,13 @@ Given A virtual router peer either by name or by object, enumerate routes being ### Example 1 ```powershell -Get-AzVirtualRouterPeerAdvertisedRouter -ResourceGroupName $resourceGroupName -VirtualRouterName $virtualRouterName -PeerName $peerName +Get-AzVirtualRouterPeerAdvertisedRoute -ResourceGroupName $resourceGroupName -VirtualRouterName $virtualRouterName -PeerName $peerName ``` ### Example 2 ```powershell $virtualRouterPeer = Get-AzVirtualRouterPeer -ResourceGroupName $resourceGroupName -VirtualRouterName $virtualRouterName -PeerName $peerName -Get-AzVirtualRouterPeerAdvertisedRouter -InputObject $virtualRouterPeer +Get-AzVirtualRouterPeerAdvertisedRoute -InputObject $virtualRouterPeer ``` ## PARAMETERS diff --git a/src/Network/Network/help/Get-AzVirtualRouterPeerLearnedRoute.md b/src/Network/Network/help/Get-AzVirtualRouterPeerLearnedRoute.md index b4ed17b2d584..a3f87ea8f34b 100644 --- a/src/Network/Network/help/Get-AzVirtualRouterPeerLearnedRoute.md +++ b/src/Network/Network/help/Get-AzVirtualRouterPeerLearnedRoute.md @@ -31,13 +31,13 @@ Enumerate routes learned by a virtual router peer from other sources. ### Example 1 ```powershell -Get-AzVirtualRouterPeerLearnedRouter -ResourceGroupName $resourceGroupName -VirtualRouterName $virtualRouterName -PeerName $peerName +Get-AzVirtualRouterPeerLearnedRoute -ResourceGroupName $resourceGroupName -VirtualRouterName $virtualRouterName -PeerName $peerName ``` ### Example 2 ```powershell $virtualRouterPeer = Get-AzVirtualRouterPeer -ResourceGroupName $resourceGroupName -VirtualRouterName $virtualRouterName -PeerName $peerName -Get-AzVirtualRouterPeerLearnedRouter -InputObject $virtualRouterPeer +Get-AzVirtualRouterPeerLearnedRoute -InputObject $virtualRouterPeer ``` ## PARAMETERS diff --git a/src/Network/Network/help/Get-AzVirtualWanVpnConfiguration.md b/src/Network/Network/help/Get-AzVirtualWanVpnConfiguration.md index cf03553e93c1..b6203c5550fb 100644 --- a/src/Network/Network/help/Get-AzVirtualWanVpnConfiguration.md +++ b/src/Network/Network/help/Get-AzVirtualWanVpnConfiguration.md @@ -60,7 +60,7 @@ configuration to a storage blob specified by the customer. New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 $vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" $vpnSiteAddressSpaces = New-Object string[] 2 diff --git a/src/Network/Network/help/Get-AzVpnClientConfiguration.md b/src/Network/Network/help/Get-AzVpnClientConfiguration.md index be64eb8f2904..189c65da861d 100644 --- a/src/Network/Network/help/Get-AzVpnClientConfiguration.md +++ b/src/Network/Network/help/Get-AzVpnClientConfiguration.md @@ -24,9 +24,9 @@ The Get-AzVpnClientConfiguration returns the URL where the VPN client can be dow ### Example 1 ```powershell -New-AzVpnClientConfiguration -VirtualNetworkGatewayName "ContosoVirtualNetworkGateway" -ResourceGroupName "ContosoResourceGroup" -AuthenticationMethod "EAPTLS" -RadiusRootCert "C:\Users\Test\Desktop\VpnProfileRadiusCert.cer" +New-AzVpnClientConfiguration -Name "ContosoVirtualNetworkGateway" -ResourceGroupName "ContosoResourceGroup" -AuthenticationMethod "EAPTLS" -RadiusRootCertificateFile "C:\Users\Test\Desktop\VpnProfileRadiusCert.cer" -Get-AzVpnClientConfiguration -VirtualNetworkGatewayName "ContosoVirtualNetworkGateway" -ResourceGroupName "ContosoResourceGroup" +Get-AzVpnClientConfiguration -Name "ContosoVirtualNetworkGateway" -ResourceGroupName "ContosoResourceGroup" ``` Gets the URL to download a VpnClient profile that has been previously generated using the New-AzVpnClientConfiguration command. diff --git a/src/Network/Network/help/Get-AzVpnConnection.md b/src/Network/Network/help/Get-AzVpnConnection.md index 4cc235624d65..5e712ab97f7f 100644 --- a/src/Network/Network/help/Get-AzVpnConnection.md +++ b/src/Network/Network/help/Get-AzVpnConnection.md @@ -44,7 +44,7 @@ Gets a vpn connection by name or lists all vpn connections connected to a VpnGat New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 $vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" $vpnSiteAddressSpaces = New-Object string[] 2 diff --git a/src/Network/Network/help/Get-AzVpnGateway.md b/src/Network/Network/help/Get-AzVpnGateway.md index 7ec1c0ba299d..9b22b459e787 100644 --- a/src/Network/Network/help/Get-AzVpnGateway.md +++ b/src/Network/Network/help/Get-AzVpnGateway.md @@ -34,7 +34,7 @@ Gets a VpnGateway resource using ResourceGroupName and GatewayName OR lists all New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" ``` diff --git a/src/Network/Network/help/Get-AzVpnGatewayNatRule.md b/src/Network/Network/help/Get-AzVpnGatewayNatRule.md index adc75cccee70..5340660e8183 100644 --- a/src/Network/Network/help/Get-AzVpnGatewayNatRule.md +++ b/src/Network/Network/help/Get-AzVpnGatewayNatRule.md @@ -41,7 +41,7 @@ Gets a NAT rule associated with VpnGateway. New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 $vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" New-AzVpnGatewayNatRule -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testNatRule" -Type Static -Mode EgressSnat -InternalMapping "10.0.0.1/26" -ExternalMapping "192.168.0.0/26" Get-AzVpnGatewayNatRule -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testNatRule" diff --git a/src/Network/Network/help/New-AzApplicationGateway.md b/src/Network/Network/help/New-AzApplicationGateway.md index 9fb95b01c86f..2e94a20474d8 100644 --- a/src/Network/Network/help/New-AzApplicationGateway.md +++ b/src/Network/Network/help/New-AzApplicationGateway.md @@ -142,7 +142,7 @@ $VNet = Get-AzVirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01" $Subnet = Get-AzVirtualNetworkSubnetConfig -Name "Subnet01" -VirtualNetwork $VNet $GatewayIPconfig = New-AzApplicationGatewayIPConfiguration -Name "GatewayIp01" -Subnet $Subnet $Pool = New-AzApplicationGatewayBackendAddressPool -Name "Pool01" -BackendIPAddresses 10.10.10.1, 10.10.10.2, 10.10.10.3 -$PoolSetting = New-AzApplicationGatewayBackendHttpSettings -Name "PoolSetting01" -Port 80 -Protocol "Http" -CookieBasedAffinity "Disabled" +$PoolSetting = New-AzApplicationGatewayBackendHttpSetting -Name "PoolSetting01" -Port 80 -Protocol "Http" -CookieBasedAffinity "Disabled" $FrontEndPort = New-AzApplicationGatewayFrontendPort -Name "FrontEndPort01" -Port 80 # Create a public IP address $PublicIp = New-AzPublicIpAddress -ResourceGroupName "ResourceGroup01" -Name "PublicIpName01" -Location "West US" -AllocationMethod "Dynamic" @@ -185,7 +185,7 @@ $VNet = Get-AzVirtualNetwork -Name "VNet01" -ResourceGroupName "ResourceGroup01" $Subnet = Get-AzVirtualNetworkSubnetConfig -Name $Subnet01 -VirtualNetwork $VNet $GatewayIPconfig = New-AzApplicationGatewayIPConfiguration -Name "GatewayIp01" -Subnet $Subnet $Pool = New-AzApplicationGatewayBackendAddressPool -Name "Pool01" -BackendIPAddresses 10.10.10.1, 10.10.10.2, 10.10.10.3 -$PoolSetting = New-AzApplicationGatewayBackendHttpSettings -Name "PoolSetting01" -Port 80 -Protocol "Http" -CookieBasedAffinity "Disabled" +$PoolSetting = New-AzApplicationGatewayBackendHttpSetting -Name "PoolSetting01" -Port 80 -Protocol "Http" -CookieBasedAffinity "Disabled" $FrontEndPort = New-AzApplicationGatewayFrontendPort -Name "FrontEndPort01" -Port 80 # Create a public IP address $PublicIp = New-AzPublicIpAddress -ResourceGroupName "ResourceGroup01" -Name "PublicIpName01" -Location "West US" -AllocationMethod "Dynamic" diff --git a/src/Network/Network/help/New-AzApplicationGatewayAutoscaleConfiguration.md b/src/Network/Network/help/New-AzApplicationGatewayAutoscaleConfiguration.md index bafd20fece8c..615740d033ff 100644 --- a/src/Network/Network/help/New-AzApplicationGatewayAutoscaleConfiguration.md +++ b/src/Network/Network/help/New-AzApplicationGatewayAutoscaleConfiguration.md @@ -24,8 +24,8 @@ The **New-AzApplicationGatewayAutoscaleConfiguration** cmdlet creates Autoscale ### Example 1 ```powershell -$autoscaleConfig = New-AzApplicationGatewayAutoscaleConfiguration -MinCapacity 3 -$gw = New-AzApplicationGateway -Name $appgwName -ResourceGroupName $rgname .. -AutoscaleConfiguration $autoscaleConfig +$AutoscaleConfig = New-AzApplicationGatewayAutoscaleConfiguration -MinCapacity 3 +$Gateway = New-AzApplicationGateway -Name "AppGateway01" -ResourceGroupName "ResourceGroup01" -Location "West US" -BackendAddressPools $Pool -BackendHttpSettingsCollection $PoolSetting -FrontendIpConfigurations $FrontEndIpConfig -GatewayIpConfigurations $GatewayIpConfig -FrontendPorts $FrontEndPort -HttpListeners $Listener -RequestRoutingRules $Rule -Sku $Sku -AutoscaleConfiguration $AutoscaleConfig ``` The first command creates an autoscale configuration with minimum capacity 3. @@ -34,7 +34,7 @@ The second command creates an application gateway with the autoscale configurati ### Example 2 ```powershell -$gw = Get-AzApplicationGateway -Name -ResourceGroupName +$gw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01" $gw.Sku.Capacity = $null $gw.AutoscaleConfiguration = New-AzApplicationGatewayAutoscaleConfiguration -MinCapacity 2 -MaxCapacity 4 $gw = Set-AzApplicationGateway -ApplicationGateway $gw diff --git a/src/Network/Network/help/New-AzApplicationGatewayFirewallCondition.md b/src/Network/Network/help/New-AzApplicationGatewayFirewallCondition.md index c376865e9541..edcbca24c664 100644 --- a/src/Network/Network/help/New-AzApplicationGatewayFirewallCondition.md +++ b/src/Network/Network/help/New-AzApplicationGatewayFirewallCondition.md @@ -25,7 +25,7 @@ The **New-AzApplicationGatewayFirewallCondition** creates a match condition for ### Example 1 ```powershell -$condition = New-AzApplicationGatewayFirewallCondition -MatchVariable $variable -Operator Contains -NegationCondition false -Transforms Lowercase, Trim -MatchValue abc, cde +$condition = New-AzApplicationGatewayFirewallCondition -MatchVariable $variable -Operator Contains -NegationCondition false -Transform Lowercase, Trim -MatchValue abc, cde ``` The command creates a new match condition using the match variable defined in the $variable, the operator is Contains and negation condition is false, Transfroms including lowercase and trim, the match value is abc and cde. The new match condition is saved in $condition. diff --git a/src/Network/Network/help/New-AzApplicationGatewayFirewallPolicyExclusionManagedRuleGroup.md b/src/Network/Network/help/New-AzApplicationGatewayFirewallPolicyExclusionManagedRuleGroup.md index 19f2f5c1ff9b..0a27f8b95259 100644 --- a/src/Network/Network/help/New-AzApplicationGatewayFirewallPolicyExclusionManagedRuleGroup.md +++ b/src/Network/Network/help/New-AzApplicationGatewayFirewallPolicyExclusionManagedRuleGroup.md @@ -25,7 +25,7 @@ The **New-AzApplicationGatewayFirewallPolicyExclusionManagedRuleGroup** creates ### Example 1 ```powershell -$ruleGroupEntry = New-AzApplicationGatewayFirewallPolicyExclusionManagedRuleGroup -RuleGroupName $ruleName -Rules $rule1,$rule2 +$ruleGroupEntry = New-AzApplicationGatewayFirewallPolicyExclusionManagedRuleGroup -RuleGroupName $ruleName -Rule $rule1,$rule2 ``` Creates an ExclusionManagedRuleGroup entry with group name as $ruleName and Rules as $rule1, $rule2. Assigns the same to $ruleGroupEntry diff --git a/src/Network/Network/help/New-AzApplicationGatewayFirewallPolicyManagedRuleGroupOverride.md b/src/Network/Network/help/New-AzApplicationGatewayFirewallPolicyManagedRuleGroupOverride.md index ea42d188bb52..f68b84584464 100644 --- a/src/Network/Network/help/New-AzApplicationGatewayFirewallPolicyManagedRuleGroupOverride.md +++ b/src/Network/Network/help/New-AzApplicationGatewayFirewallPolicyManagedRuleGroupOverride.md @@ -25,7 +25,7 @@ The **New-AzApplicationGatewayFirewallPolicyManagedRuleGroupOverride** creates a ### Example 1 ```powershell -$overrideEntry = New-AzApplicationGatewayFirewallPolicyManagedRuleGroupOverride -RuleGroupName $ruleName -Rules $rule1,$rule2 +$overrideEntry = New-AzApplicationGatewayFirewallPolicyManagedRuleGroupOverride -RuleGroupName $ruleName -Rule $rule1,$rule2 ``` Creates a RuleGroupOverride entry with group name as $ruleName and Rules as $rule1, $rule2. Assigns the same to $overrideEntry diff --git a/src/Network/Network/help/New-AzApplicationGatewayPathRuleConfig.md b/src/Network/Network/help/New-AzApplicationGatewayPathRuleConfig.md index 3707847ec2a0..55cdf2f11e4a 100644 --- a/src/Network/Network/help/New-AzApplicationGatewayPathRuleConfig.md +++ b/src/Network/Network/help/New-AzApplicationGatewayPathRuleConfig.md @@ -42,7 +42,7 @@ Path map configuration settings are used in application gateway load balancing. ```powershell $Gateway = Get-AzApplicationGateway -Name "ContosoApplicationGateway" $AddressPool = New-AzApplicationGatewayBackendAddressPool -Name "ContosoAddressPool" -BackendIPAddresses "192.168.1.1", "192.168.1.2" -$HttpSettings = New-AzApplicationGatewayBackendHttpSettings -Name "ContosoHttpSettings" -Port 80 -Protocol "Http" -CookieBasedAffinity "Disabled" +$HttpSettings = New-AzApplicationGatewayBackendHttpSetting -Name "ContosoHttpSettings" -Port 80 -Protocol "Http" -CookieBasedAffinity "Disabled" $PathRuleConfig = New-AzApplicationGatewayPathRuleConfig -Name "base" -Paths "/base" -BackendAddressPool $AddressPool -BackendHttpSettings $HttpSettings Add-AzApplicationGatewayUrlPathMapConfig -ApplicationGateway $Gateway -Name "ContosoUrlPathMap" -PathRules $PathRuleConfig -DefaultBackendAddressPool $AddressPool -DefaultBackendHttpSettings $HttpSettings ``` diff --git a/src/Network/Network/help/New-AzDelegation.md b/src/Network/Network/help/New-AzDelegation.md index 92b3bd19964f..1d3f7eaec6a4 100644 --- a/src/Network/Network/help/New-AzDelegation.md +++ b/src/Network/Network/help/New-AzDelegation.md @@ -28,7 +28,7 @@ $delegation = New-AzDelegation -Name "myDelegation" -ServiceName "Microsoft.Sql/ $vnet = Get-AzVirtualNetwork -Name "myVNet" -ResourceGroupName "myResourceGroup" $subnet = Get-AzVirtualNetworkSubnetConfig -Name "mySubnet" -VirtualNetwork $vnet $subnet.Delegations.Add($delegation) -Set-AzVirtualNetwork $vnet +Set-AzVirtualNetwork -VirtualNetwork $vnet ``` The first cmdlet creates a delegation that can be added to a subnet, and stores it in the $delegation variable. The second and third cmdlets retrieve the subnet to be delegated. The fourth cmdlet adds the created delegation to the subnet of interest, and the final cmdlet sends the updated configuration to the server. diff --git a/src/Network/Network/help/New-AzExpressRouteCircuitPeeringConfig.md b/src/Network/Network/help/New-AzExpressRouteCircuitPeeringConfig.md index e8e1cfcbe23c..da922eb5dd87 100644 --- a/src/Network/Network/help/New-AzExpressRouteCircuitPeeringConfig.md +++ b/src/Network/Network/help/New-AzExpressRouteCircuitPeeringConfig.md @@ -51,7 +51,6 @@ by using a connectivity provider instead of the public Internet. ```powershell $parameters = @{ Name = 'AzurePrivatePeering' - Circuit = $circuit PeeringType = 'AzurePrivatePeering' PeerASN = 100 PrimaryPeerAddressPrefix = '10.6.1.0/30' diff --git a/src/Network/Network/help/New-AzExpressRouteConnection.md b/src/Network/Network/help/New-AzExpressRouteConnection.md index 89d150e69235..dd6147c81bdd 100644 --- a/src/Network/Network/help/New-AzExpressRouteConnection.md +++ b/src/Network/Network/help/New-AzExpressRouteConnection.md @@ -49,7 +49,7 @@ $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Na Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit $ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300 $ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit $ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id -New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 +New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 ``` ```output diff --git a/src/Network/Network/help/New-AzFirewall.md b/src/Network/Network/help/New-AzFirewall.md index d6b9309d4925..abba71634e15 100644 --- a/src/Network/Network/help/New-AzFirewall.md +++ b/src/Network/Network/help/New-AzFirewall.md @@ -133,8 +133,8 @@ This example creates a Firewall with all available availability zones. ```powershell $rgName = "resourceGroupName" $vnet = Get-AzVirtualNetwork -Name "vnet" -ResourceGroupName $rgName -$pip1 = New-AzPublicIpAddress -Name "AzFwPublicIp1" -ResourceGroupName "rg" -SkuName "AZFW_VNet" -SkuTier "Standard" -Location "centralus" -AllocationMethod Static -$pip2 = New-AzPublicIpAddress -Name "AzFwPublicIp2" -ResourceGroupName "rg" -SkuName "AZFW_VNet" -SkuTier "Standard" -Location "centralus" -AllocationMethod Static +$pip1 = New-AzPublicIpAddress -Name "AzFwPublicIp1" -ResourceGroupName "rg" -Sku "Basic" -Tier "Regional" -Location "centralus" -AllocationMethod Static +$pip2 = New-AzPublicIpAddress -Name "AzFwPublicIp2" -ResourceGroupName "rg" -Sku "Basic" -Tier "Regional" -Location "centralus" -AllocationMethod Static New-AzFirewall -Name "azFw" -ResourceGroupName $rgName -Location centralus -VirtualNetwork $vnet -PublicIpAddress @($pip1, $pip2) ``` @@ -172,7 +172,7 @@ $rgName = "resourceGroupName" $vnet = Get-AzVirtualNetwork -ResourceGroupName $rgName -Name "vnet" $pip = Get-AzPublicIpAddress -ResourceGroupName $rgName -Name "publicIpName" -$tiWhitelist = New-AzFirewallThreatIntelWhitelist -FQDN @("www.microsoft.com") -IpAddresses @("8.8.8.8") +$tiWhitelist = New-AzFirewallThreatIntelWhitelist -FQDN @("www.microsoft.com") -IpAddress @("8.8.8.8") New-AzFirewall -Name "azFw" -ResourceGroupName $rgName -Location centralus -VirtualNetwork $vnet -PublicIpAddress $pip -ThreatIntelWhitelist $tiWhitelist ``` @@ -235,8 +235,8 @@ $rgName = "resourceGroupName" $vHub = Get-AzVirtualHub -Name "hub" $vHubId = $vHub.Id $fwpips = New-AzFirewallHubPublicIpAddress -Count 2 -$hubIpAddresses = New-AzFirewallHubIpAddress -PublicIPs $fwpips -$fw=New-AzFirewall -Name "azFw" -ResourceGroupName $rgName -Location westus -SkuName AZFW_Hub -HubIPAddresses $hubIpAddresses -VirtualHubId $vHubId +$hubIpAddresses = New-AzFirewallHubIpAddress -PublicIP $fwpips +$fw=New-AzFirewall -Name "azFw" -ResourceGroupName $rgName -Location westus -SkuName AZFW_Hub -HubIPAddress $hubIpAddresses -VirtualHubId $vHubId ``` This example creates a Firewall attached to virtual hub "hub" in the same resource group as the firewall. diff --git a/src/Network/Network/help/New-AzFirewallHubIpAddress.md b/src/Network/Network/help/New-AzFirewallHubIpAddress.md index c5d768bd505a..24efe1a53266 100644 --- a/src/Network/Network/help/New-AzFirewallHubIpAddress.md +++ b/src/Network/Network/help/New-AzFirewallHubIpAddress.md @@ -25,10 +25,10 @@ Ip addresses assoicated to the firewall on virtual hub. These can be public and ### Example 1 ```powershell $fwpips = New-AzFirewallHubPublicIpAddress -Count 2 -New-AzFirewallHubIpAddress -PublicIPs $fwpips +New-AzFirewallHubIpAddress -PublicIP $fwpips ``` -This example creates a Hub Ip address object with a count of 2 public IPs. The HubIPAddress object is ssociated to the firewall on the virtual hub. +This example creates a Hub Ip address object with a count of 2 public IPs. The HubIPAddress object is associated to the firewall on the virtual hub. ## PARAMETERS diff --git a/src/Network/Network/help/New-AzFirewallHubPublicIpAddress.md b/src/Network/Network/help/New-AzFirewallHubPublicIpAddress.md index 6f80245283cd..2df09516f647 100644 --- a/src/Network/Network/help/New-AzFirewallHubPublicIpAddress.md +++ b/src/Network/Network/help/New-AzFirewallHubPublicIpAddress.md @@ -33,7 +33,7 @@ This will create 2 public ips on the firewall attached to the virtual hub. This ```powershell $publicIp1 = New-AzFirewallPublicIpAddress -Address 10.2.3.4 $publicIp2 = New-AzFirewallPublicIpAddress -Address 20.56.37.46 -New-AzFirewallHubPublicIpAddress -Count 3 -Addresses $publicIp1, $publicIp2 +New-AzFirewallHubPublicIpAddress -Count 3 -Address $publicIp1, $publicIp2 ``` This will create 1 new public ip on the firewall by retain $publicIp1, $publicIp2 which are already exist on the firewall. diff --git a/src/Network/Network/help/New-AzFirewallPolicy.md b/src/Network/Network/help/New-AzFirewallPolicy.md index b383136ebbb1..8efc8436940b 100644 --- a/src/Network/Network/help/New-AzFirewallPolicy.md +++ b/src/Network/Network/help/New-AzFirewallPolicy.md @@ -55,7 +55,7 @@ $bypass = New-AzFirewallPolicyIntrusionDetectionBypassTraffic -Name "bypass-sett $signatureOverride = New-AzFirewallPolicyIntrusionDetectionSignatureOverride -Id "123456798" -Mode "Deny" $intrusionDetection = New-AzFirewallPolicyIntrusionDetection -Mode "Alert" -SignatureOverride $signatureOverride -BypassTraffic $bypass $userAssignedIdentity = '/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/TestRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-assign-identity' -New-AzFirewallPolicy -Name fp1 -Location "westus2" -ResourceGroup TestRg -SkuTier "Premium" -IntrusionDetection $intrusionDetection -TransportSecurityName tsName -TransportSecurityKeyVaultSecretId "https://.vault.azure.net/secrets/cacert" -UserAssignedIdentityId $userAssignedIdentity +New-AzFirewallPolicy -Name fp1 -Location "westus2" -ResourceGroupName TestRg -SkuTier "Premium" -IntrusionDetection $intrusionDetection -TransportSecurityName tsName -TransportSecurityKeyVaultSecretId "https://.vault.azure.net/secrets/cacert" -UserAssignedIdentityId $userAssignedIdentity ``` This example creates an azure firewall policy with a intrusion detection in mode alert, user assigned identity and transport security diff --git a/src/Network/Network/help/New-AzFirewallPolicyIntrusionDetection.md b/src/Network/Network/help/New-AzFirewallPolicyIntrusionDetection.md index 9f6c6fb0c259..533d111d0471 100644 --- a/src/Network/Network/help/New-AzFirewallPolicyIntrusionDetection.md +++ b/src/Network/Network/help/New-AzFirewallPolicyIntrusionDetection.md @@ -43,7 +43,7 @@ This example creates intrusion detection with specific signature override ```powershell $bypass = New-AzFirewallPolicyIntrusionDetectionBypassTraffic -Name "bypass-setting" -Protocol "TCP" -DestinationPort "80" -SourceAddress "10.0.0.0" -DestinationAddress "10.0.0.0" $intrusionDetection = New-AzFirewallPolicyIntrusionDetection -Mode "Deny" -BypassTraffic $bypass -New-AzFirewallPolicy -Name fp1 -Location "westus2" -ResourceGroup TestRg -SkuTier "Premium" -IntrusionDetection $intrusionDetection +New-AzFirewallPolicy -Name fp1 -Location "westus2" -ResourceGroupName TestRg -SkuTier "Premium" -IntrusionDetection $intrusionDetection ``` This example creates intrusion detection with bypass traffic setting diff --git a/src/Network/Network/help/New-AzIpConfigurationBgpPeeringAddressObject.md b/src/Network/Network/help/New-AzIpConfigurationBgpPeeringAddressObject.md index d111ce75fc59..403f1f9281d6 100644 --- a/src/Network/Network/help/New-AzIpConfigurationBgpPeeringAddressObject.md +++ b/src/Network/Network/help/New-AzIpConfigurationBgpPeeringAddressObject.md @@ -27,7 +27,7 @@ The **New-AzIpConfigurationBgpPeeringAddressObject** creates a IpConfigurationBg ```powershell $ipconfigurationId1 = '/subscriptions/c886bc58-0000-4e01-993f-e01ba3702aaf/resourceGroups/testRg/providers/Microsoft.Network/virtualNetworkGateways/gw1/ipConfigurations/default' $addresslist1 = @('169.254.21.5') -$gw1ipconfBgp1 = New-AzIpConfigurationBgpPeeringAddresses -IpConfigurationId $ipconfigurationId1 -CustomAddress $addresslist1 +$gw1ipconfBgp1 = New-AzIpConfigurationBgpPeeringAddressObject -IpConfigurationId $ipconfigurationId1 -CustomAddress $addresslist1 ``` The above will create a IpConfigurationBgpPeeringAddressObject.This new object will be to gw1ipconfBgp1. diff --git a/src/Network/Network/help/New-AzNetworkWatcher.md b/src/Network/Network/help/New-AzNetworkWatcher.md index ab120d844b21..c42c2ce11de8 100644 --- a/src/Network/Network/help/New-AzNetworkWatcher.md +++ b/src/Network/Network/help/New-AzNetworkWatcher.md @@ -25,7 +25,7 @@ The New-AzNetworkWatcher cmdlet creates a new Network Watcher resource. ### Example 1: Create a Network Watcher ```powershell New-AzResourceGroup -Name NetworkWatcherRG -Location westcentralus -New-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroup NetworkWatcherRG +New-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroupName NetworkWatcherRG ``` ```output diff --git a/src/Network/Network/help/New-AzNetworkWatcherPacketCapture.md b/src/Network/Network/help/New-AzNetworkWatcherPacketCapture.md index b2223820801b..83a15dc952d0 100644 --- a/src/Network/Network/help/New-AzNetworkWatcherPacketCapture.md +++ b/src/Network/Network/help/New-AzNetworkWatcherPacketCapture.md @@ -48,7 +48,7 @@ Filters can be applied to a given packet capture session, allowing you to custom ### Example 1: Create a Packet Capture with multiple filters ```powershell -$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } +$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } $networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName $storageAccount = Get-AzStorageAccount -ResourceGroupName contosoResourceGroup -Name contosostorage123 diff --git a/src/Network/Network/help/New-AzNetworkWatcherProtocolConfiguration.md b/src/Network/Network/help/New-AzNetworkWatcherProtocolConfiguration.md index 5c9ae35d0c1b..cac37b959bfe 100644 --- a/src/Network/Network/help/New-AzNetworkWatcherProtocolConfiguration.md +++ b/src/Network/Network/help/New-AzNetworkWatcherProtocolConfiguration.md @@ -25,7 +25,7 @@ This object is used to restrict the protocol configuration during a connectivity ### Example 1: Test Network Watcher Connectivity from a VM to a website with protocol configuration ```powershell -$config = New-AzNetworkWatcherProtocolConfiguration -Protocol Http -Method Get -Headers @{"accept"="application/json"} -ValidStatusCodes @(200,202,204) +$config = New-AzNetworkWatcherProtocolConfiguration -Protocol Http -Method Get -Header @{"accept"="application/json"} -ValidStatusCode @(200,202,204) Test-AzNetworkWatcherConnectivity -NetworkWatcherName NetworkWatcher -ResourceGroupName NetworkWatcherRG -SourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ContosoRG/providers/Microsoft.Compute/virtualMachines/MultiTierApp0" -DestinationAddress "bing.com" -DestinationPort 80 -ProtocolConfiguration $config ``` diff --git a/src/Network/Network/help/New-AzPacketCaptureFilterConfig.md b/src/Network/Network/help/New-AzPacketCaptureFilterConfig.md index cae22c1b7e3c..d28a44df278a 100644 --- a/src/Network/Network/help/New-AzPacketCaptureFilterConfig.md +++ b/src/Network/Network/help/New-AzPacketCaptureFilterConfig.md @@ -26,14 +26,14 @@ The New-AzNetworkWatcherPacketCapture cmdlet can accept multiple filter objects ### Example 1: Create a Packet Capture with multiple filters ```powershell -$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } +$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } $networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName $storageAccount = Get-AzStorageAccount -ResourceGroupName contosoResourceGroup -Name contosostorage123 $filter1 = New-AzPacketCaptureFilterConfig -Protocol TCP -RemoteIPAddress "1.1.1.1-255.255.255" -LocalIPAddress "10.0.0.3" -LocalPort "1-65535" -RemotePort "20;80;443" $filter2 = New-AzPacketCaptureFilterConfig -Protocol UDP -New-AzNetworkWatcherPacketCapture -NetworkWatcher $networkWatcher -TargetVirtualMachineId $vm.Id -PacketCaptureName "PacketCaptureTest" -StorageAccountId $storageAccount.id -TimeLimitInSeconds 60 -Filters $filter1, $filter2 +New-AzNetworkWatcherPacketCapture -NetworkWatcher $networkWatcher -TargetVirtualMachineId $vm.Id -PacketCaptureName "PacketCaptureTest" -StorageAccountId $storageAccount.id -TimeLimitInSeconds 60 -Filter $filter1, $filter2 ``` In this example we create a packet capture named "PacketCaptureTest" with multiple filters and a time limit. Once the session is complete, it will be saved to the specified storage account. diff --git a/src/Network/Network/help/New-AzPrivateEndpoint.md b/src/Network/Network/help/New-AzPrivateEndpoint.md index 9875905dcbb8..8a742c795a7f 100644 --- a/src/Network/Network/help/New-AzPrivateEndpoint.md +++ b/src/Network/Network/help/New-AzPrivateEndpoint.md @@ -35,7 +35,7 @@ specified subnet in a virtual network. $virtualNetwork = Get-AzVirtualNetwork -ResourceName 'myVirtualNetwork' -ResourceGroupName 'myResourceGroup' $subnet = $virtualNetwork | Select-Object -ExpandProperty subnets | Where-Object Name -eq 'mySubnet' $plsConnection= New-AzPrivateLinkServiceConnection -Name 'MyPLSConnections' -PrivateLinkServiceId '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateLinkServices/privateLinkService' -RequestMessage 'Please Approve my request' -New-AzPrivateEndpoint -Name 'MyPrivateEndpoint' -ResourceGroup 'myResourceGroup' -Location 'centralus' -PrivateLinkServiceConnection $plsConnection -Subnet $subnet +New-AzPrivateEndpoint -Name 'MyPrivateEndpoint' -ResourceGroupName 'myResourceGroup' -Location 'centralus' -PrivateLinkServiceConnection $plsConnection -Subnet $subnet ``` ## PARAMETERS diff --git a/src/Network/Network/help/New-AzServiceEndpointPolicyDefinition.md b/src/Network/Network/help/New-AzServiceEndpointPolicyDefinition.md index 39c0491ad58d..5140d23870c1 100644 --- a/src/Network/Network/help/New-AzServiceEndpointPolicyDefinition.md +++ b/src/Network/Network/help/New-AzServiceEndpointPolicyDefinition.md @@ -24,7 +24,7 @@ The **New-AzServiceEndpointPolicyDefinition** cmdlet create a service endpoint p ### Example 1: Creates a service endpoint policy ```powershell -$policydef= New-AzServiceEndpointPolicyDefinition -Name "ServiceEndpointPolicyDefinition1" -ResourceGroupName "ResourceGroup01" -Service "Microsoft.Storage" -ServiceResources "subscriptions/sub1" -Description "New Definition" +$policydef= New-AzServiceEndpointPolicyDefinition -Name "ServiceEndpointPolicyDefinition1" -Service "Microsoft.Storage" -ServiceResource "subscriptions/sub1" -Description "New Definition" ``` This command creates the service endpoint policy definition with name ServiceEndpointPolicyDefinition1, service Microsoft.Storage, service resources subscriptions/sub1 and diff --git a/src/Network/Network/help/New-AzVHubRoute.md b/src/Network/Network/help/New-AzVHubRoute.md index ada32b8927c1..213305c1601e 100644 --- a/src/Network/Network/help/New-AzVHubRoute.md +++ b/src/Network/Network/help/New-AzVHubRoute.md @@ -64,8 +64,8 @@ The above command will create a VHubRoute object with nextHop as the specified h ### Example 3 ```powershell -$hub = Get-AzVirtualHub -ResourceGroupName {rgname} -Name {virtual-hub-name} -$hubVnetConn = Get-AzVirtualHubVnetConnection -ParentObject $hub -Name {connection-name} +$hub = Get-AzVirtualHub -ResourceGroupName "rgname" -Name "virtual-hub-name" +$hubVnetConn = Get-AzVirtualHubVnetConnection -ParentObject $hub -Name "connection-name" $hubVnetConn Name : conn_2 diff --git a/src/Network/Network/help/New-AzVirtualNetworkGateway.md b/src/Network/Network/help/New-AzVirtualNetworkGateway.md index b0963de8e537..c852a161b1e7 100644 --- a/src/Network/Network/help/New-AzVirtualNetworkGateway.md +++ b/src/Network/Network/help/New-AzVirtualNetworkGateway.md @@ -89,7 +89,7 @@ $vnet = New-AzVirtualNetwork -AddressPrefix "10.254.0.0/27" -Location "UK West" $subnet = Get-AzVirtualNetworkSubnetConfig -name 'gatewaysubnet' -VirtualNetwork $vnet $ngwipconfig = New-AzVirtualNetworkGatewayIpConfig -Name ngwipconfig -SubnetId $subnet.Id -PublicIpAddressId $ngwpip.Id $rootCert = New-AzVpnClientRootCertificate -Name $clientRootCertName -PublicCertData $samplePublicCertData -$vpnclientipsecpolicy = New-AzVpnClientIpsecPolicy -IpsecEncryption AES256 -IpsecIntegrity SHA256 -SALifeTimeSeconds 86471 -SADataSizeKilobytes 429496 -IkeEncryption AES256 -IkeIntegrity SHA384 -DhGroup DHGroup2 -PfsGroup PFS2 +$vpnclientipsecpolicy = New-AzVpnClientIpsecPolicy -IpsecEncryption AES256 -IpsecIntegrity SHA256 -SALifeTime 86471 -SADataSize 429496 -IkeEncryption AES256 -IkeIntegrity SHA384 -DhGroup DHGroup2 -PfsGroup PFS2 New-AzVirtualNetworkGateway -Name myNGW -ResourceGroupName vnet-gateway -Location "UK West" -IpConfigurations $ngwIpConfig -GatewayType "Vpn" -VpnType "RouteBased" -GatewaySku "VpnGw1" -VpnClientProtocol IkeV2 -VpnClientAddressPool 201.169.0.0/16 -VpnClientRootCertificates $rootCert -VpnClientIpsecPolicy $vpnclientipsecpolicy -CustomRoute 192.168.0.0/24 ``` @@ -146,7 +146,7 @@ $vnet = New-AzVirtualNetwork -AddressPrefix "10.254.0.0/27" -Location "UK West" $subnet = Get-AzVirtualNetworkSubnetConfig -name 'gatewaysubnet' -VirtualNetwork $vnet $ngwipconfig = New-AzVirtualNetworkGatewayIpConfig -Name ipconfig1 -SubnetId $subnet.Id -PublicIpAddressId $ngwpip.Id -$ipconfigurationId1 = ngwipconfig.id +$ipconfigurationId1 = $ngwipconfig.Id $addresslist1 = @('169.254.21.10') $gw1ipconfBgp1 = New-AzIpConfigurationBgpPeeringAddressObject -IpConfigurationId $ipconfigurationId1 -CustomAddress $addresslist1 diff --git a/src/Network/Network/help/New-AzVirtualNetworkGatewayConnection.md b/src/Network/Network/help/New-AzVirtualNetworkGatewayConnection.md index f739669bb423..c55925f9c0ef 100644 --- a/src/Network/Network/help/New-AzVirtualNetworkGatewayConnection.md +++ b/src/Network/Network/help/New-AzVirtualNetworkGatewayConnection.md @@ -50,8 +50,8 @@ New-AzVirtualNetworkGatewayConnection -Name conn-client-1 -ResourceGroupName $RG ``` ### Example 2 Add/Update IngressNatRule/EgressNatRule to an existing virtual network gateway connection ```powershell -$ingressnatrule = get-azVirtualNetworkGatewayNatRule -ResourceGroupName $RG1 -Name "natRule1" -ParentResourceName vnetgw1 -$egressnatrule = get-azVirtualNetworkGatewayNatRule -ResourceGroupName $RG1 -Name "natRule2" -ParentResourceName vnetgw1 +$ingressnatrule = Get-AzVirtualNetworkGatewayNatRule -ResourceGroupName $RG1 -Name "natRule1" -ParentResourceName vnetgw1 +$egressnatrule = Get-azVirtualNetworkGatewayNatRule -ResourceGroupName $RG1 -Name "natRule2" -ParentResourceName vnetgw1 New-AzVirtualNetworkGatewayConnection -Name conn-client-1 -ResourceGroupName $RG1 -VirtualNetworkGateway1 $vnetgw1 -VirtualNetworkGateway2 $vnetgw2 -Location $loc1 -ConnectionType Vnet2Vnet -SharedKey 'a1b2c3d4e5' -IngressNatRule $ingressnatrule -EgressNatRule $egressnatrule ``` diff --git a/src/Network/Network/help/New-AzVpnConnection.md b/src/Network/Network/help/New-AzVpnConnection.md index d138af520086..89cb327facf6 100644 --- a/src/Network/Network/help/New-AzVpnConnection.md +++ b/src/Network/Network/help/New-AzVpnConnection.md @@ -78,14 +78,14 @@ Creates a IPSec connection that connects a VpnGateway to a remote customer branc New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 $vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" $vpnSiteAddressSpaces = New-Object string[] 2 $vpnSiteAddressSpaces[0] = "192.168.2.0/24" $vpnSiteAddressSpaces[1] = "192.168.3.0/24" $vpnSite = New-AzVpnSite -ResourceGroupName "testRG" -Name "testVpnSite" -Location "West US" -VirtualWan $virtualWan -IpAddress "1.2.3.4" -AddressSpace $vpnSiteAddressSpaces -DeviceModel "SomeDevice" -DeviceVendor "SomeDeviceVendor" -LinkSpeedInMbps "10" -New-AzVpnConnection -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testConnection" -VpnSite $vpnSite -ConnectionBandwidth 20 +New-AzVpnConnection -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testConnection" -VpnSite $vpnSite -ConnectionBandwidthInMbps 20 ``` ```output diff --git a/src/Network/Network/help/New-AzVpnGatewayNatRule.md b/src/Network/Network/help/New-AzVpnGatewayNatRule.md index 0794b46a9d4d..bda03a40b68f 100644 --- a/src/Network/Network/help/New-AzVpnGatewayNatRule.md +++ b/src/Network/Network/help/New-AzVpnGatewayNatRule.md @@ -47,10 +47,10 @@ Creates a NAT rule on a VpnGateway which can be associated with VpnGateway. New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 $vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -New-AzVpnGatewayNatRule -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testNatRule" -Type Static -Mode EgressSnat -InternalMapping "10.0.0.1/26" -ExternalMapping "192.168.0.0/26" -InternalPortRange "100-100" --ExternalPortRange "200-200" +New-AzVpnGatewayNatRule -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testNatRule" -Type Static -Mode EgressSnat -InternalMapping "10.0.0.1/26" -ExternalMapping "192.168.0.0/26" -InternalPortRange "100-100" -ExternalPortRange "200-200" ``` ```output diff --git a/src/Network/Network/help/Remove-AzApplicationGatewayConnectionDraining.md b/src/Network/Network/help/Remove-AzApplicationGatewayConnectionDraining.md index f7258c091ade..f0f921070819 100644 --- a/src/Network/Network/help/Remove-AzApplicationGatewayConnectionDraining.md +++ b/src/Network/Network/help/Remove-AzApplicationGatewayConnectionDraining.md @@ -25,7 +25,7 @@ The **Remove-AzApplicationGatewayConnectionDraining** cmdlet removes the connect ### Example 1 ```powershell $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01" -$Settings = Get-AzApplicationGatewayBackendHttpSettings -Name "Settings01" -ApplicationGateway $AppGw +$Settings = Get-AzApplicationGatewayBackendHttpSetting -Name "Settings01" -ApplicationGateway $AppGw Remove-AzApplicationGatewayConnectionDraining -BackendHttpSettings $Settings Set-AzApplicationGateway -ApplicationGateway $AppGW ``` diff --git a/src/Network/Network/help/Remove-AzDelegation.md b/src/Network/Network/help/Remove-AzDelegation.md index d68359091fc1..cb13fae39c4f 100644 --- a/src/Network/Network/help/Remove-AzDelegation.md +++ b/src/Network/Network/help/Remove-AzDelegation.md @@ -28,13 +28,13 @@ The **Remove-AzDelegation** cmdlet takes in a Subnet with delegations and remove $vnet = Get-AzVirtualNetwork -Name "myVNet" -ResourceGroupName "myResourceGroup" $subnet = Get-AzVirtualNetworkSubnetConfig -Name "mySubnet" -VirtualNetwork $vnet $subnet = Add-AzDelegation -Name "myDelegation" -ServiceName "Microsoft.Sql/servers" -Subnet $subnet -Set-AzVirtualNetwork $vnet +Set-AzVirtualNetwork -VirtualNetwork $vnet # Remove the delegation $vnet = Get-AzVirtualNetwork -Name "myVNet" -ResourceGroupName "myResourceGroup" $subnet = Get-AzVirtualNetworkSubnetConfig -Name "mySubnet" -VirtualNetwork $vnet $subnet = Remove-AzDelegation -Name "myDelegation" -Subnet $subnet -Set-AzVirtualNetwork $vnet +Set-AzVirtualNetwork -VirtualNetwork $vnet ``` In this example, the first half (found under _"Add a delegation to an existing subnet"_) is identical to [Add-AzDelegation](./Add-AzDelegation.md). In the second half, the first two cmdlets retrieve the subnet of interest, refreshing the local copy with what's on the server. The third cmdlet removes the delegation that was created in the first half from _mySubnet_ and stores the updated subnet in _$subnet_. The final cmdlet updates the server with the removed delegation. diff --git a/src/Network/Network/help/Remove-AzExpressRouteCircuitAuthorization.md b/src/Network/Network/help/Remove-AzExpressRouteCircuitAuthorization.md index fd41b7824f4a..0cdb0197af8d 100644 --- a/src/Network/Network/help/Remove-AzExpressRouteCircuitAuthorization.md +++ b/src/Network/Network/help/Remove-AzExpressRouteCircuitAuthorization.md @@ -34,7 +34,7 @@ able to use the ExpressRoute circuit to connect to Azure. ### Example 1: Remove a circuit authorization from an ExpressRoute circuit ```powershell $Circuit = Get-AzExpressRouteCircuit -Name "ContosoCircuit" -ResourceGroupName "ContosoResourceGroup" -Remove-AzExpressRouteCircuitAuthorization -Name "ContosoCircuitAuthorization" -Circuit $Circuit +Remove-AzExpressRouteCircuitAuthorization -Name "ContosoCircuitAuthorization" -ExpressRouteCircuit $Circuit Set-AzExpressRouteCircuit -ExpressRouteCircuit $Circuit ``` diff --git a/src/Network/Network/help/Remove-AzExpressRouteConnection.md b/src/Network/Network/help/Remove-AzExpressRouteConnection.md index f27e4f731fef..2862f22b2d4d 100644 --- a/src/Network/Network/help/Remove-AzExpressRouteConnection.md +++ b/src/Network/Network/help/Remove-AzExpressRouteConnection.md @@ -46,8 +46,8 @@ $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Na Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit $ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300 $ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit $ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id -New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 -Remove-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" +New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 +Remove-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection" ``` The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub in West US in "testRG" resource group in Azure. @@ -69,8 +69,8 @@ $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Na Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit $ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300 $ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit $ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id -New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 -Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" | Remove-AzExpressRouteConnection +New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 +Get-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection" | Remove-AzExpressRouteConnection ``` Same as example 1, but it now removes the connection using the piped object from Get-AzExpressRouteConnection. diff --git a/src/Network/Network/help/Remove-AzExpressRouteGateway.md b/src/Network/Network/help/Remove-AzExpressRouteGateway.md index 29f81bcd3147..468ecc7c3458 100644 --- a/src/Network/Network/help/Remove-AzExpressRouteGateway.md +++ b/src/Network/Network/help/Remove-AzExpressRouteGateway.md @@ -56,7 +56,7 @@ New-AzResourceGroup -Location "West Central US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West Central US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" -VirtualHubId $virtualHub.Id -MinScaleUnits 2 -Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" | Remove-AzExpressRouteGateway-Passthru +Get-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testExpressRoutegw" | Remove-AzExpressRouteGateway -Passthru ``` This example creates a Resource group, Virtual WAN, Virtual Hub, scalable ExpressRoute gateway in West Central US and then immediately deletes it. diff --git a/src/Network/Network/help/Remove-AzExpressRoutePort.md b/src/Network/Network/help/Remove-AzExpressRoutePort.md index 32194e7311eb..7e3a20c915f7 100644 --- a/src/Network/Network/help/Remove-AzExpressRoutePort.md +++ b/src/Network/Network/help/Remove-AzExpressRoutePort.md @@ -44,14 +44,14 @@ Removes $PortName ExpressRoutePort resource in $rg resource group in your subscr ### Example 2 ```powershell -Remove-AzExpressRoutePort -InputObject $erPort +Remove-AzExpressRoutePort -InputObject $Port ``` Removes the ExpressRoutePort resource in InputObject. ### Example 3 ```powershell -Remove-AzExpressRoutePort -Name $ResourceId $id +Remove-AzExpressRoutePort -ResourceId $id ``` Removes the ExpressRoutePort resource with ResourceId $id. diff --git a/src/Network/Network/help/Remove-AzNetworkInterface.md b/src/Network/Network/help/Remove-AzNetworkInterface.md index fb4ff53c8eac..0d4fdbecd6f8 100644 --- a/src/Network/Network/help/Remove-AzNetworkInterface.md +++ b/src/Network/Network/help/Remove-AzNetworkInterface.md @@ -25,7 +25,7 @@ The **Remove-AzNetworkInterface** cmdlet removes an Azure network interface. ### Example 1: Remove a network interface ```powershell -Remove-AzNetworkInterface -Name "NetworkInterface1" -ResourceGroup "ResourceGroup1" +Remove-AzNetworkInterface -Name "NetworkInterface1" -ResourceGroupName "ResourceGroup1" ``` This command removes the network interface NetworkInterface1 in resource group ResourceGroup1. diff --git a/src/Network/Network/help/Remove-AzNetworkInterfaceTapConfig.md b/src/Network/Network/help/Remove-AzNetworkInterfaceTapConfig.md index 1894092c3b55..5dfde0d1e0d6 100644 --- a/src/Network/Network/help/Remove-AzNetworkInterfaceTapConfig.md +++ b/src/Network/Network/help/Remove-AzNetworkInterfaceTapConfig.md @@ -37,7 +37,7 @@ The **Remove-AzNetworkInterfaceTapConfig** cmdlet removes an Azure tap configura ### Example 1: Remove a tap configuration ```powershell -Remove-AzNetworkInterfaceTapConfig -Name "TapConfiguration" -NetworkInterfaceName "NetworkInterface1" -ResourceGroup "ResourceGroup1" +Remove-AzNetworkInterfaceTapConfig -Name "TapConfiguration" -NetworkInterfaceName "NetworkInterface1" -ResourceGroupName "ResourceGroup1" ``` This command removes the TapConfiguration from NetworkInterface1 in a resource group ResourceGroup1. @@ -45,7 +45,7 @@ Because the *Force* parameter is not used, the user will be prompted to confirm ### Example 2: Remove a network interface ```powershell -Get-AzNetworkInterfaceTapConfig -Name "TapConfiguration" -NetworkInterfaceName "NetworkInterface1" -ResourceGroup "ResourceGroup1" | Remove-AzNetworkInterfaceTapConfig -Force +Get-AzNetworkInterfaceTapConfig -Name "TapConfiguration" -NetworkInterfaceName "NetworkInterface1" -ResourceGroupName "ResourceGroup1" | Remove-AzNetworkInterfaceTapConfig -Force ``` This command removes the TapConfiguration from NetworkInterface1 in a resource group ResourceGroup1. diff --git a/src/Network/Network/help/Remove-AzNetworkWatcher.md b/src/Network/Network/help/Remove-AzNetworkWatcher.md index 44fd2bf3599e..437cfd987cfb 100644 --- a/src/Network/Network/help/Remove-AzNetworkWatcher.md +++ b/src/Network/Network/help/Remove-AzNetworkWatcher.md @@ -38,8 +38,8 @@ The Remove-AzNetworkWatcher cmdlet removes a Network Watcher resource. ### Example 1: Create and delete a Network Watcher ```powershell New-AzResourceGroup -Name NetworkWatcherRG -Location westcentralus -New-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroup NetworkWatcherRG -Location westcentralus -Remove-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroup NetworkWatcherRG +New-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroupName NetworkWatcherRG -Location westcentralus +Remove-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroupName NetworkWatcherRG ``` This example creates a Network Watcher in a resource group and then immediately deletes it. Note that only one Network Watcher can be created per region per subscription. diff --git a/src/Network/Network/help/Remove-AzServiceEndpointPolicy.md b/src/Network/Network/help/Remove-AzServiceEndpointPolicy.md index 346f268f6439..c9446e0af38a 100644 --- a/src/Network/Network/help/Remove-AzServiceEndpointPolicy.md +++ b/src/Network/Network/help/Remove-AzServiceEndpointPolicy.md @@ -37,14 +37,14 @@ The **Remove-AzServiceEndpointPolicy** cmdlet removes a service endpoint policy. ### Example 1: Removes a service endpoint policy using name ```powershell -Remove-AzServiceEndpointPolicy -Name "Policy1" -ResourceGroup "resourcegroup1" +Remove-AzServiceEndpointPolicy -Name "Policy1" -ResourceGroupName "resourcegroup1" ``` This command removes a service endpoint policy with name Policy1 which belongs to resourcegroup with name "resourcegroup1" ### Example 2: Remove a service endpoint policy using input object ```powershell -Remove-AzServiceEndpointPolicy -InputObject $Policy1 -ResourceGroup "resourcegroup1" +Remove-AzServiceEndpointPolicy -InputObject $Policy1 -ResourceGroupName "resourcegroup1" ``` This command removes a service endpoint policy object Policy1 which belongs to resourcegroup with name "resourcegroup1" diff --git a/src/Network/Network/help/Remove-AzVirtualNetworkTap.md b/src/Network/Network/help/Remove-AzVirtualNetworkTap.md index 2da62b30fba9..feaf10bf56a7 100644 --- a/src/Network/Network/help/Remove-AzVirtualNetworkTap.md +++ b/src/Network/Network/help/Remove-AzVirtualNetworkTap.md @@ -37,7 +37,7 @@ The **Remove-AzVirtualNetworkTap** cmdlet removes an Azure virtual network tap. ### Example 1: Remove a virtual network tap ```powershell -Remove-AzNetworkInterface -Name "VirtualNetworkTap1" -ResourceGroup "ResourceGroup1" +Remove-AzNetworkInterface -Name "VirtualNetworkTap1" -ResourceGroupName "ResourceGroup1" ``` This command removes the VirtualNetworkTap1 in resource group ResourceGroup1. diff --git a/src/Network/Network/help/Remove-AzVirtualRouterPeer.md b/src/Network/Network/help/Remove-AzVirtualRouterPeer.md index ba8b3ac4bb91..a5a9d8bef803 100644 --- a/src/Network/Network/help/Remove-AzVirtualRouterPeer.md +++ b/src/Network/Network/help/Remove-AzVirtualRouterPeer.md @@ -48,7 +48,7 @@ Remove-AzVirtualRouterPeer -ResourceId $virtualRouterPeerId ### Example 3 ```powershell -$virtualRouterPeer = Get-AzVirtualRouterPeer -ResourceGroupName virtualRouter -RouterName virtualRouter -PeerName csr +$virtualRouterPeer = Get-AzVirtualRouterPeer -ResourceGroupName virtualRouter -VirtualRouterName virtualRouter -PeerName csr Remove-AzVirtualRouterPeer -InputObject $virtualRouterPeer ``` diff --git a/src/Network/Network/help/Remove-AzVpnClientRevokedCertificate.md b/src/Network/Network/help/Remove-AzVpnClientRevokedCertificate.md index e7d8f0ab209f..5554be71c718 100644 --- a/src/Network/Network/help/Remove-AzVpnClientRevokedCertificate.md +++ b/src/Network/Network/help/Remove-AzVpnClientRevokedCertificate.md @@ -28,7 +28,7 @@ If you remove a client-revocation certificate client computers can then use the ### Example 1: Remove a client-revocation certificate from a virtual network gateway ```powershell -Remove-AzVpnClientRevokedCertificate -VirtualNetworkGatewayName "ContosoVirtualNetwork" -ResourceGroupName"ContosoResourceGroup" -VpnClientRevokedCertificateName "ContosoRevokedClientCertificate" -Thumbprint "E3A38EBA60CAA1C162785A2E1C44A15AD450199C3" +Remove-AzVpnClientRevokedCertificate -VirtualNetworkGatewayName "ContosoVirtualNetwork" -ResourceGroupName "ContosoResourceGroup" -VpnClientRevokedCertificateName "ContosoRevokedClientCertificate" -Thumbprint "E3A38EBA60CAA1C162785A2E1C44A15AD450199C3" ``` This command removes a client-revocation certificate from a virtual network gateway named ContosoVirtualNetwork. diff --git a/src/Network/Network/help/Remove-AzVpnConnection.md b/src/Network/Network/help/Remove-AzVpnConnection.md index cabbabfa3194..e5c0814070c0 100644 --- a/src/Network/Network/help/Remove-AzVpnConnection.md +++ b/src/Network/Network/help/Remove-AzVpnConnection.md @@ -40,7 +40,7 @@ Removes a VpnConnection. New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 $vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" $vpnSiteAddressSpaces = New-Object string[] 2 @@ -66,7 +66,7 @@ Then it removes the connection using the connection name. New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 $vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" $vpnSiteAddressSpaces = New-Object string[] 2 diff --git a/src/Network/Network/help/Remove-AzVpnGateway.md b/src/Network/Network/help/Remove-AzVpnGateway.md index 12e4abaedfbd..8a4a1af2f44a 100644 --- a/src/Network/Network/help/Remove-AzVpnGateway.md +++ b/src/Network/Network/help/Remove-AzVpnGateway.md @@ -41,7 +41,7 @@ The Remove-AzVpnGateway cmdlet removes an Azure VPN gateway. This is a gateway s New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 Remove-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -Passthru ``` @@ -55,8 +55,8 @@ This will delete the VpnGateway and all VpnConnections attached to it. New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 -Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" | Remove-AzVpnGateway-Passthru +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 +Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" | Remove-AzVpnGateway -Passthru ``` This example creates a Resource group, Virtual WAN, Virtual Hub, scalable VPN gateway in Central US and then immediately deletes it. diff --git a/src/Network/Network/help/Remove-AzVpnGatewayNatRule.md b/src/Network/Network/help/Remove-AzVpnGatewayNatRule.md index c573c7a16899..82f238825f21 100644 --- a/src/Network/Network/help/Remove-AzVpnGatewayNatRule.md +++ b/src/Network/Network/help/Remove-AzVpnGatewayNatRule.md @@ -41,7 +41,7 @@ Removes a NAT rule associated with VpnGateway. New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" $virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" -New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -BGPPeeringWeight 10 -VpnGatewayScaleUnit 2 +New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2 $vpnGateway = Get-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" New-AzVpnGatewayNatRule -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testNatRule" -Type Static -Mode EgressSnat -InternalMapping "10.0.0.1/26" -ExternalMapping "192.168.0.0/26" Remove-AzVpnGatewayNatRule -ResourceGroupName $vpnGateway.ResourceGroupName -ParentResourceName $vpnGateway.Name -Name "testNatRule" diff --git a/src/Network/Network/help/Set-AzApplicationGatewayConnectionDraining.md b/src/Network/Network/help/Set-AzApplicationGatewayConnectionDraining.md index e56e5b7511a6..f7edbcfd1721 100644 --- a/src/Network/Network/help/Set-AzApplicationGatewayConnectionDraining.md +++ b/src/Network/Network/help/Set-AzApplicationGatewayConnectionDraining.md @@ -25,7 +25,7 @@ The **Set-AzApplicationGatewayWebApplicationFirewallConfiguration** cmdlet modif ### Example 1 ```powershell $AppGw = Get-AzApplicationGateway -Name "ApplicationGateway01" -ResourceGroupName "ResourceGroup01" -$Settings = Get-AzApplicationGatewayBackendHttpSettings -Name "Settings01" -ApplicationGateway $AppGw +$Settings = Get-AzApplicationGatewayBackendHttpSetting -Name "Settings01" -ApplicationGateway $AppGw Set-AzApplicationGatewayConnectionDraining -BackendHttpSettings $poolSetting02 -Enabled $False -DrainTimeoutInSec 3600 ``` diff --git a/src/Network/Network/help/Set-AzApplicationGatewayTrustedClientCertificate.md b/src/Network/Network/help/Set-AzApplicationGatewayTrustedClientCertificate.md index b087dd9bd98f..c7da79e1c92a 100644 --- a/src/Network/Network/help/Set-AzApplicationGatewayTrustedClientCertificate.md +++ b/src/Network/Network/help/Set-AzApplicationGatewayTrustedClientCertificate.md @@ -25,7 +25,7 @@ The **Set-AzApplicationGatewayTrustedClientCertificate** cmdlet modifies the tru ### Example 1 ```powershell $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName -$gw = Set-AzApplicationGatewayTrustedClientCertificate -ApplicationGateway $gw -Name $certName --CertificateFile ".\clientCAUpdated.cer" +$gw = Set-AzApplicationGatewayTrustedClientCertificate -ApplicationGateway $gw -Name $certName -CertificateFile ".\clientCAUpdated.cer" $gw = Set-AzApplicationGateway -ApplicationGateway $gw ``` diff --git a/src/Network/Network/help/Set-AzApplicationGatewayTrustedRootCertificate.md b/src/Network/Network/help/Set-AzApplicationGatewayTrustedRootCertificate.md index 8b8016b9aca5..90b1fe92d989 100644 --- a/src/Network/Network/help/Set-AzApplicationGatewayTrustedRootCertificate.md +++ b/src/Network/Network/help/Set-AzApplicationGatewayTrustedRootCertificate.md @@ -25,7 +25,7 @@ The **Set-AzApplicationGatewayTrustedRootCertificate** cmdlet modifies the exist ### Example 1 ```powershell $gw = Get-AzApplicationGateway -Name $appgwName -ResourceGroupName $resgpName -$gw = Set-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName --CertificateFile ".\rootCAUpdated.cer" +$gw = Set-AzApplicationGatewayTrustedRootCertificate -ApplicationGateway $gw -Name $certName -CertificateFile ".\rootCAUpdated.cer" $gw = Set-AzApplicationGateway -ApplicationGateway $gw ``` diff --git a/src/Network/Network/help/Set-AzExpressRouteConnection.md b/src/Network/Network/help/Set-AzExpressRouteConnection.md index e122777e2e53..cd5ef9ed631e 100644 --- a/src/Network/Network/help/Set-AzExpressRouteConnection.md +++ b/src/Network/Network/help/Set-AzExpressRouteConnection.md @@ -49,7 +49,7 @@ $ExpressRouteCircuit = New-AzExpressRouteCircuit -ResourceGroupName "testRG" -Na Add-AzExpressRouteCircuitPeeringConfig -Name "AzurePrivatePeering" -ExpressRouteCircuit $ExpressRouteCircuit -PeeringType AzurePrivatePeering -PeerASN 100 -PrimaryPeerAddressPrefix "123.0.0.0/30" -SecondaryPeerAddressPrefix "123.0.0.4/30" -VlanId 300 $ExpressRouteCircuit = Set-AzExpressRouteCircuit -ExpressRouteCircuit $ExpressRouteCircuit $ExpressRouteCircuitPeeringId = $ExpressRouteCircuit.Peerings[0].Id -New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ParentResourceName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 +New-AzExpressRouteConnection -ResourceGroupName $ExpressRouteGateway.ResourceGroupName -ExpressRouteGatewayName $ExpressRouteGateway.Name -Name "testConnection" -ExpressRouteCircuitPeeringId $ExpressRouteCircuitPeeringId -RoutingWeight 20 Set-AzExpressRouteConnection -InputObject $ExpressRouteConnection -RoutingWeight 30 ``` diff --git a/src/Network/Network/help/Set-AzExpressRouteGateway.md b/src/Network/Network/help/Set-AzExpressRouteGateway.md index 4d72d7daae2e..6f7ed3f8b505 100644 --- a/src/Network/Network/help/Set-AzExpressRouteGateway.md +++ b/src/Network/Network/help/Set-AzExpressRouteGateway.md @@ -42,9 +42,9 @@ The **Set-AzExpressRouteGateway** cmdlet enables you to update the scale units f ### Example 1 ```powershell -Set-AzResourceGroup -Location "West US" -Name "testRG" -$virtualWan =Set-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" -$virtualHub =Set-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" +New-AzResourceGroup -Location "West US" -Name "testRG" +$virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US" +$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24" New-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testergw" -VirtualHubId $virtualHub.Id -MinScaleUnits 2 Set-AzExpressRouteGateway -ResourceGroupName "testRG" -Name "testergw" -MinScaleUnits 3 ``` @@ -59,8 +59,8 @@ Type : Microsoft.Network/expressRouteGateways ProvisioningState : Succeeded ``` -The above will create a resource group, Virtual WAN, Virtual Network, Virtual Hub in West US in "testRG" resource group in Azure. -An ExpressRoute gateway will be created thereafter in the Virtual Hub with 2 scale units which will then be modified to 3 scale units +The above will create a resource group "testRG", a Virtual WAN and a Virtual Hub in West US in that resource group in Azure. +An ExpressRoute gateway will be created thereafter in the Virtual Hub with 2 scale units which will then be modified to 3 scale units. ## PARAMETERS diff --git a/src/Network/Network/help/Set-AzFirewall.md b/src/Network/Network/help/Set-AzFirewall.md index 2c1f76931a4e..8b4bc46a51ee 100644 --- a/src/Network/Network/help/Set-AzFirewall.md +++ b/src/Network/Network/help/Set-AzFirewall.md @@ -56,7 +56,7 @@ the real configuration in cloud. For changes to be reflected in cloud, Set-AzFir ```powershell $azFw = Get-AzFirewall -Name "AzureFirewall" -ResourceGroupName "rg" $azFw.ThreatIntelMode = "Deny" -Set-AzFirewall -Firewall $azFw +Set-AzFirewall -AzureFirewall $azFw ``` This example updates the Threat Intel operation mode of Azure Firewall "AzureFirewall" in resource group "rg". diff --git a/src/Network/Network/help/Set-AzLoadBalancerFrontendIpConfig.md b/src/Network/Network/help/Set-AzLoadBalancerFrontendIpConfig.md index 963ebca4bbb6..0dbedb1cdea2 100644 --- a/src/Network/Network/help/Set-AzLoadBalancerFrontendIpConfig.md +++ b/src/Network/Network/help/Set-AzLoadBalancerFrontendIpConfig.md @@ -83,7 +83,7 @@ The fourth command passes the load balancer in $slb to **Set-AzLoadBalancerFront ### Example 2: Modify the front-end IP configuration of a load balancer with Gateway Load Balancer ```powershell $slb1 = Get-AzLoadBalancer -Name "MyLoadBalancer1" -ResourceGroupName "MyResourceGroup" -$feip = $Get-AzLoadBalancerFrontendIpConfig -Name "MyFrontEnd" -LoadBalancer $slb1 +$feip = Get-AzLoadBalancerFrontendIpConfig -Name "MyFrontEnd" -LoadBalancer $slb1 $slb2 = Get-AzLoadBalancer -Name "MyLoadBalancer1" -ResourceGroupName "MyResourceGroup" $slb2 | Set-AzLoadBalancerFrontendIpConfig -Name "NewFrontend" -PublicIpAddress $publicIp -GatewayLoadBalancerId $feip.Id $slb2 | Set-AzLoadBalancer diff --git a/src/Network/Network/help/Set-AzNetworkInterfaceTapConfig.md b/src/Network/Network/help/Set-AzNetworkInterfaceTapConfig.md index 044d991b7ef3..a134689517d0 100644 --- a/src/Network/Network/help/Set-AzNetworkInterfaceTapConfig.md +++ b/src/Network/Network/help/Set-AzNetworkInterfaceTapConfig.md @@ -24,7 +24,7 @@ The **Set-AzNetworkInterfaceTapConfig** updates a tap configuration for a networ ### Example 1: Set the TapConfiguration with updated TapConfig name ```powershell -$tapConfig = Get-AzNetworkInterface -ResourceGroupName "ResourceGroup1" -NetworkInterface "sourceNicName" -Name "tapconfigName" +$tapConfig = Get-AzNetworkInterfaceTapConfig -ResourceGroupName "ResourceGroup1" -NetworkInterfaceName "sourceNicName" -Name "tapconfigName" $tapConfig.Name = "NewTapName" Set-AzNetworkInterfaceTapConfig -NetworkInterfaceTapConfig $tapConfig ``` diff --git a/src/Network/Network/help/Set-AzNetworkProfile.md b/src/Network/Network/help/Set-AzNetworkProfile.md index 1ad745674c8f..1a769153df8c 100644 --- a/src/Network/Network/help/Set-AzNetworkProfile.md +++ b/src/Network/Network/help/Set-AzNetworkProfile.md @@ -28,7 +28,7 @@ $networkProfile = Get-AzNetworkProfile -Name np1 -ResourceGroupName rg1 $networkProfile.Tags = "TestTag" -$networkProfile.ContainerNetworkInterfaceConfigurations = New-AzNetworkProfileContainerNicConfig -Name cnicconfig1 +$networkProfile.ContainerNetworkInterfaceConfigurations = New-AzContainerNicConfig -Name cnicconfig1 $networkProfile | Set-AzNetworkProfile ``` diff --git a/src/Network/Network/help/Set-AzPrivateDnsZoneGroup.md b/src/Network/Network/help/Set-AzPrivateDnsZoneGroup.md index 637aee984b63..34dac8cc0530 100644 --- a/src/Network/Network/help/Set-AzPrivateDnsZoneGroup.md +++ b/src/Network/Network/help/Set-AzPrivateDnsZoneGroup.md @@ -40,7 +40,7 @@ PrivateDnsZoneConfigs : [ $zone1 = Get-AzPrivateDnsZone -ResourceGroupName rg -Name "test1.vault.azure.com" $config = New-AzPrivateDnsZoneConfig -Name test1-vault-azure-com -PrivateDnsZoneId $zone1.ResourceId -Set-AzPrivateDnsZoneGroup -ResourceGroupName rg -PrivateEndpointName my-pr-endpoint -name dnsgroup1 -PrivateDnsZoneConfig $config -Force +Set-AzPrivateDnsZoneGroup -ResourceGroupName rg -PrivateEndpointName my-pr-endpoint -name dnsgroup1 -PrivateDnsZoneConfig $config Name : dnsgroup1 Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Network/privateEndpoints/my-pr-endpoint/privateDnsZoneGroups/dnsgroup1 diff --git a/src/Network/Network/help/Set-AzPrivateEndpoint.md b/src/Network/Network/help/Set-AzPrivateEndpoint.md index 68fa5f728164..5c8a6005da09 100644 --- a/src/Network/Network/help/Set-AzPrivateEndpoint.md +++ b/src/Network/Network/help/Set-AzPrivateEndpoint.md @@ -26,7 +26,7 @@ The **Set-AzPrivateEndpoint** cmdlet updates a private endpoint. ```powershell $virtualNetwork = Get-AzVirtualNetwork -ResourceName MyVirtualNetwork -ResourceGroupName TestResourceGroup $plsConnection= New-AzPrivateLinkServiceConnection -Name MyPLSConnections -PrivateLinkServiceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/TestResourceGroup/providers/Microsoft.Network/privateLinkServices/privateLinkService" -RequestMessage "Please Approve my request" -$privateEndpoint = New-AzPrivateEndpoint -Name MyPrivateEndpoint -ResourceGroup TestResourceGroup -Location centralus -PirvateLinkServiceConnection $plsConnection -Subnet $virtualNetwork.Subnets[0] +$privateEndpoint = New-AzPrivateEndpoint -Name MyPrivateEndpoint -ResourceGroupName TestResourceGroup -Location centralus -PirvateLinkServiceConnection $plsConnection -Subnet $virtualNetwork.Subnets[0] $privateEndpoint.Subnet = $virtualNetwork.Subnet[1] diff --git a/src/Network/Network/help/Set-AzServiceEndpointPolicy.md b/src/Network/Network/help/Set-AzServiceEndpointPolicy.md index e0b8984b5cca..12b07cdef6a2 100644 --- a/src/Network/Network/help/Set-AzServiceEndpointPolicy.md +++ b/src/Network/Network/help/Set-AzServiceEndpointPolicy.md @@ -18,13 +18,14 @@ Set-AzServiceEndpointPolicy -ServiceEndpointPolicy ``` ## DESCRIPTION -The **Set-AzServiceEndpointPolicy** cmdlet create a service endpoint policy. +The **Set-AzServiceEndpointPolicy** cmdlet updates a service endpoint policy. ## EXAMPLES ### Example 1: Sets a service endpoint policy ```powershell -$serviceEndpointPolicy = Set-AzServiceEndpointPolicy -Name "Policy1" -ServiceEndpointPolicy $serviceEndpointPolicy -ResourceGroup "resourcegroup1" +$serviceEndpointPolicy = Get-AzServiceEndpointPolicy -Name "Policy1" -ResourceGroupName "resourcegroup1" +Set-AzServiceEndpointPolicy -ServiceEndpointPolicy $serviceEndpointPolicy ``` This command updates a service endpoint policy named Policy1 defined by the object $serviceEndpointPolicy belong to the resourcegroup "resourcegroup1". diff --git a/src/Network/Network/help/Set-AzVirtualNetworkGateway.md b/src/Network/Network/help/Set-AzVirtualNetworkGateway.md index 1e90ecd12f4c..76e5412af4a6 100644 --- a/src/Network/Network/help/Set-AzVirtualNetworkGateway.md +++ b/src/Network/Network/help/Set-AzVirtualNetworkGateway.md @@ -65,8 +65,8 @@ The command also sets the ASN to 1337. ### Example 2: Add IPsec policy to a virtual network gateway ```powershell $Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001" -$vpnclientipsecpolicy = New-AzVpnClientIpsecPolicy -IpsecEncryption AES256 -IpsecIntegrity SHA256 -SALifeTimeSeconds 86472 -SADataSizeKilobytes 429497 -IkeEncryption AES256 -IkeIntegrity SHA256 -DhGroup DHGroup2 -PfsGroup None -$gateway = Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -VpnClientIpsecPolicy $vpnclientipsecpolicy +$vpnclientipsecpolicy = New-AzVpnClientIpsecPolicy -IpsecEncryption AES256 -IpsecIntegrity SHA256 -SALifeTime 86472 -SADataSize 429497 -IkeEncryption AES256 -IkeIntegrity SHA256 -DhGroup DHGroup2 -PfsGroup None +Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -VpnClientIpsecPolicy $vpnclientipsecpolicy ``` The first command gets a virtual network gateway named Gateway01 that belongs to resource group ResourceGroup001 and stores it to the variable named $Gateway diff --git a/src/Network/Network/help/Set-AzVirtualNetworkGatewayConnection.md b/src/Network/Network/help/Set-AzVirtualNetworkGatewayConnection.md index c51bef1bf3f3..603d19f65cda 100644 --- a/src/Network/Network/help/Set-AzVirtualNetworkGatewayConnection.md +++ b/src/Network/Network/help/Set-AzVirtualNetworkGatewayConnection.md @@ -116,7 +116,7 @@ TunnelConnectionStatus : [] ### Example 3: Add/Remove natRules to an existing VirtualNetworkGatewayConnection ```powershell $conn = Get-AzVirtualNetworkGatewayConnection -Name 1 -ResourceGroupName myRG -$egressNatrule = get-azVirtualNetworkGatewayNatRule -ResourceGroupName myRG -Name "natRule1" -ParentResourceName "gw1" +$egressNatrule = Get-azVirtualNetworkGatewayNatRule -ResourceGroupName myRG -Name "natRule1" -ParentResourceName "gw1" Set-AzVirtualNetworkGatewayConnection -VirtualNetworkGatewayConnection $conn -IngressNatRule @() -EgressNatRule $egressNatrule ``` diff --git a/src/Network/Network/help/Set-AzVirtualNetworkGatewayDefaultSite.md b/src/Network/Network/help/Set-AzVirtualNetworkGatewayDefaultSite.md index 61350a26b621..28696198493b 100644 --- a/src/Network/Network/help/Set-AzVirtualNetworkGatewayDefaultSite.md +++ b/src/Network/Network/help/Set-AzVirtualNetworkGatewayDefaultSite.md @@ -28,7 +28,7 @@ Forced tunneling is carried out by using a virtual private network (VPN) tunnel; ### Example 1: Assign a default site to a virtual network gateway ```powershell -$LocalGateway = Get-AzLocalNetworkGateway -Name "ContosoLocalGateway " -ResourceGroup "ContosoResourceGroup" +$LocalGateway = Get-AzLocalNetworkGateway -Name "ContosoLocalGateway " -ResourceGroupName "ContosoResourceGroup" $VirtualGateway = Get-AzVirtualNetworkGateway -Name "ContosoVirtualGateway" Set-AzVirtualNetworkGatewayDefaultSite -GatewayDefaultSite $LocalGateway -VirtualNetworkGateway $VirtualGateway ``` diff --git a/src/Network/Network/help/Set-AzVirtualNetworkSubnetConfig.md b/src/Network/Network/help/Set-AzVirtualNetworkSubnetConfig.md index a596684cad0e..bd70314d988c 100644 --- a/src/Network/Network/help/Set-AzVirtualNetworkSubnetConfig.md +++ b/src/Network/Network/help/Set-AzVirtualNetworkSubnetConfig.md @@ -44,8 +44,7 @@ New-AzResourceGroup -Name TestResourceGroup -Location centralus $frontendSubnet = New-AzVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "10.0.1.0/24" -$virtualNetwork = New-AzVirtualNetwork -Name MyVirtualNetwork -ResourceGroupName TestResourceGroup - -Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet +$virtualNetwork = New-AzVirtualNetwork -Name MyVirtualNetwork -ResourceGroupName TestResourceGroup -Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet Set-AzVirtualNetworkSubnetConfig -Name frontendSubnet -VirtualNetwork $virtualNetwork -AddressPrefix "10.0.3.0/23" @@ -63,17 +62,13 @@ New-AzResourceGroup -Name TestResourceGroup -Location centralus $frontendSubnet = New-AzVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "10.0.1.0/24" -$virtualNetwork = New-AzVirtualNetwork -Name MyVirtualNetwork -ResourceGroupName TestResourceGroup - -Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet +$virtualNetwork = New-AzVirtualNetwork -Name MyVirtualNetwork -ResourceGroupName TestResourceGroup -Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet -$rdpRule = New-AzNetworkSecurityRuleConfig -Name rdp-rule -Description "Allow RDP" -Access Allow - -Protocol Tcp -Direction Inbound -Priority 100 -SourceAddressPrefix Internet -SourcePortRange * -DestinationAddressPrefix * -DestinationPortRange 3389 +$rdpRule = New-AzNetworkSecurityRuleConfig -Name rdp-rule -Description "Allow RDP" -Access Allow -Protocol Tcp -Direction Inbound -Priority 100 -SourceAddressPrefix Internet -SourcePortRange * -DestinationAddressPrefix * -DestinationPortRange 3389 -$networkSecurityGroup = New-AzNetworkSecurityGroup -ResourceGroupName - TestResourceGroup -Location centralus -Name "NSG-FrontEnd" -SecurityRules $rdpRule +$networkSecurityGroup = New-AzNetworkSecurityGroup -ResourceGroupName TestResourceGroup -Location centralus -Name "NSG-FrontEnd" -SecurityRules $rdpRule -Set-AzVirtualNetworkSubnetConfig -Name frontendSubnet -VirtualNetwork $virtualNetwork -AddressPrefix - "10.0.1.0/24" -NetworkSecurityGroup $networkSecurityGroup +Set-AzVirtualNetworkSubnetConfig -Name frontendSubnet -VirtualNetwork $virtualNetwork -AddressPrefix "10.0.1.0/24" -NetworkSecurityGroupId $networkSecurityGroup.Id $virtualNetwork | Set-AzVirtualNetwork ``` @@ -95,8 +90,7 @@ $natGateway = New-AzNatGateway -ResourceGroupName "natgateway_test" -Name "nat_g $frontendSubnet = New-AzVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix "10.0.1.0/24" -$virtualNetwork = New-AzVirtualNetwork -Name MyVirtualNetwork -ResourceGroupName TestResourceGroup - -Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet +$virtualNetwork = New-AzVirtualNetwork -Name MyVirtualNetwork -ResourceGroupName TestResourceGroup -Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet Set-AzVirtualNetworkSubnetConfig -Name frontendSubnet -VirtualNetwork $virtualNetwork -InputObject $natGateway diff --git a/src/Network/Network/help/Start-AzNetworkWatcherResourceTroubleshooting.md b/src/Network/Network/help/Start-AzNetworkWatcherResourceTroubleshooting.md index ac85f5a5130c..6e6ad183f49f 100644 --- a/src/Network/Network/help/Start-AzNetworkWatcherResourceTroubleshooting.md +++ b/src/Network/Network/help/Start-AzNetworkWatcherResourceTroubleshooting.md @@ -38,7 +38,7 @@ The Start-AzNetworkWatcherResourceTroubleshooting cmdlet starts troubleshooting ### Example 1: Start Troubleshooting on a Virtual Network Gateway ```powershell -$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } +$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } $networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName $target = '/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{vnetGatewayName}' diff --git a/src/Network/Network/help/Stop-AzVirtualNetworkGatewayConnectionPacketCapture.md b/src/Network/Network/help/Stop-AzVirtualNetworkGatewayConnectionPacketCapture.md index 66b542223f6b..556ef37c5e7c 100644 --- a/src/Network/Network/help/Stop-AzVirtualNetworkGatewayConnectionPacketCapture.md +++ b/src/Network/Network/help/Stop-AzVirtualNetworkGatewayConnectionPacketCapture.md @@ -38,14 +38,14 @@ Stops Packet Capture Operation on a Virtual Network Gateway connection and will ### Example 1 ```powershell $rgname = "testRg" - $storeName = "teststorage" - $containerName = "packetcaptureresults" - $key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName - $context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value - New-AzStorageContainer -Name $containerName -Context $context - $container = Get-AzStorageContainer -Name $containerName -Context $context - $now=get-date - $sasurl = New-AzureStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri +$storeName = "teststorage" +$containerName = "packetcaptureresults" +$key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName +$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value +New-AzStorageContainer -Name $containerName -Context $context +$container = Get-AzStorageContainer -Name $containerName -Context $context +$now = Get-Date +$sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri Stop-AzVirtualNetworkGatewayConnectionPacketCapture -ResourceGroupName $rgname -Name "testconn" -SasUrl $sasurl ``` @@ -68,14 +68,14 @@ Id : ### Example 2 ```powershell $rgname = "testRg" - $storeName = "teststorage" - $containerName = "packetcaptureresults" - $key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName - $context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value - $container = Get-AzStorageContainer -Name $containerName -Context $context - $now=get-date - $sasurl = New-AzureStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri - $conn = Get-AzVirtualNetworkGatewayConnection -name "testconn" -ResourceGroupName $rgname +$storeName = "teststorage" +$containerName = "packetcaptureresults" +$key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName +$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value +$container = Get-AzStorageContainer -Name $containerName -Context $context +$now = Get-Date +$sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri +$conn = Get-AzVirtualNetworkGatewayConnection -name "testconn" -ResourceGroupName $rgname Stop-AzVirtualNetworkGatewayConnectionPacketCapture -InputObject $conn -SasUrl $sasurl ``` diff --git a/src/Network/Network/help/Stop-AzVirtualNetworkGatewayPacketCapture.md b/src/Network/Network/help/Stop-AzVirtualNetworkGatewayPacketCapture.md index f540205f6e4d..f0d1a2ffbabc 100644 --- a/src/Network/Network/help/Stop-AzVirtualNetworkGatewayPacketCapture.md +++ b/src/Network/Network/help/Stop-AzVirtualNetworkGatewayPacketCapture.md @@ -38,14 +38,14 @@ Stops Packet Capture Operation on a Virtual Network Gateway and will upload the ### Example 1 ```powershell $rgname = "testRg" - $storeName = "teststorage" - $containerName = "packetcaptureresults" - $key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName - $context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value - New-AzStorageContainer -Name $containerName -Context $context - $container = Get-AzStorageContainer -Name $containerName -Context $context - $now=get-date - $sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri +$storeName = "teststorage" +$containerName = "packetcaptureresults" +$key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName +$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value +New-AzStorageContainer -Name $containerName -Context $context +$container = Get-AzStorageContainer -Name $containerName -Context $context +$now = Get-Date +$sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri Stop-AzVirtualNetworkGatewayPacketCapture -ResourceGroupName $rgname -Name "testgw" -SasUrl $sasurl ``` @@ -68,14 +68,14 @@ Id : ### Example 2 ```powershell $rgname = "testRg" - $storeName = "teststorage" - $containerName = "packetcaptureresults" - $key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName - $context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value - $container = Get-AzStorageContainer -Name $containerName -Context $context - $now=get-date - $sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri - $gw = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name "testGw" +$storeName = "teststorage" +$containerName = "packetcaptureresults" +$key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName +$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value +$container = Get-AzStorageContainer -Name $containerName -Context $context +$now = Get-Date +$sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri +$gw = Get-AzVirtualNetworkGateway -ResourceGroupName $rgname -name "testGw" Stop-AzVirtualNetworkGatewayPacketCapture -InputObject $gw -SasUrl $sasurl ``` diff --git a/src/Network/Network/help/Stop-AzVpnConnectionPacketCapture.md b/src/Network/Network/help/Stop-AzVpnConnectionPacketCapture.md index f1d17a8bac9d..820fcb418f25 100644 --- a/src/Network/Network/help/Stop-AzVpnConnectionPacketCapture.md +++ b/src/Network/Network/help/Stop-AzVpnConnectionPacketCapture.md @@ -39,14 +39,14 @@ Stops Packet Capture Operation on a Vpn connection and will upload the result on ### Example 1 ```powershell $rgname = "testRg" - $storeName = "teststorage" - $containerName = "packetcaptureresults" - $key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName - $context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value - New-AzStorageContainer -Name $containerName -Context $context - $container = Get-AzStorageContainer -Name $containerName -Context $context - $now=get-date - $sasurl = New-AzureStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri +$storeName = "teststorage" +$containerName = "packetcaptureresults" +$key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName +$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value +New-AzStorageContainer -Name $containerName -Context $context +$container = Get-AzStorageContainer -Name $containerName -Context $context +$now = Get-Date +$sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri Stop-AzVpnConnectionPacketCapture -ResourceGroupName $rgname -Name "testconn" -ParentResourceName "VpnGw1" -LinkConnectionName "SiteLink1,SiteLink2" -SasUrl $sasurl ``` @@ -70,14 +70,14 @@ Id : ### Example 2 ```powershell $rgname = "testRg" - $storeName = "teststorage" - $containerName = "packetcaptureresults" - $key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName - $context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value - $container = Get-AzStorageContainer -Name $containerName -Context $context - $now=get-date - $sasurl = New-AzureStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri - $conn = Get-AzVpnConnection -name "testconn" -ResourceGroupName $rgname +$storeName = "teststorage" +$containerName = "packetcaptureresults" +$key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName +$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value +$container = Get-AzStorageContainer -Name $containerName -Context $context +$now = Get-Date +$sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri +$conn = Get-AzVpnConnection -name "testconn" -ResourceGroupName $rgname Stop-AzVpnConnectionPacketCapture -InputObject $conn -SasUrl $sasurl -LinkConnectionName "SiteLink1,SiteLink2" ``` diff --git a/src/Network/Network/help/Stop-AzVpnGatewayPacketCapture.md b/src/Network/Network/help/Stop-AzVpnGatewayPacketCapture.md index 1c5b84c82e44..99c359d748f3 100644 --- a/src/Network/Network/help/Stop-AzVpnGatewayPacketCapture.md +++ b/src/Network/Network/help/Stop-AzVpnGatewayPacketCapture.md @@ -38,14 +38,14 @@ Stops Packet Capture Operation on a Vpn Gateway and will upload the result on gi ### Example 1 ```powershell $rgname = "testRg" - $storeName = "teststorage" - $containerName = "packetcaptureresults" - $key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName - $context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value - New-AzStorageContainer -Name $containerName -Context $context - $container = Get-AzStorageContainer -Name $containerName -Context $context - $now=get-date - $sasurl = New-AzureStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri +$storeName = "teststorage" +$containerName = "packetcaptureresults" +$key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName +$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value +New-AzStorageContainer -Name $containerName -Context $context +$container = Get-AzStorageContainer -Name $containerName -Context $context +$now = Get-Date +$sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri Stop-AzVpnGatewayPacketCapture -ResourceGroupName $rgname -Name "testgw" -SasUrl $sasurl ``` @@ -68,14 +68,14 @@ Id : ### Example 2 ```powershell $rgname = "testRg" - $storeName = "teststorage" - $containerName = "packetcaptureresults" - $key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName - $context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value - $container = Get-AzStorageContainer -Name $containerName -Context $context - $now=get-date - $sasurl = New-AzureStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri - $gw = Get-AzVpnGateway -ResourceGroupName $rgname -name "testGw" +$storeName = "teststorage" +$containerName = "packetcaptureresults" +$key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName +$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value +$container = Get-AzStorageContainer -Name $containerName -Context $context +$now = Get-Date +$sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri +$gw = Get-AzVpnGateway -ResourceGroupName $rgname -name "testGw" Stop-AzVpnGatewayPacketCapture -InputObject $gw -SasUrl $sasurl ``` diff --git a/src/Network/Network/help/Test-AzNetworkWatcherIPFlow.md b/src/Network/Network/help/Test-AzNetworkWatcherIPFlow.md index dc4cef8927ac..a1ea04cdaba8 100644 --- a/src/Network/Network/help/Test-AzNetworkWatcherIPFlow.md +++ b/src/Network/Network/help/Test-AzNetworkWatcherIPFlow.md @@ -43,7 +43,7 @@ The Test-AzNetworkWatcherIPFlow cmdlet, for a specified VM resource and a packet ### Example 1: Run Test-AzNetworkWatcherIPFlow ```powershell -$nw = Get-AzResource | Where {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } +$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" } $networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName $VM = Get-AzVM -ResourceGroupName testResourceGroup -Name VM0 $Nics = Get-AzNetworkInterface | Where-Object { $vm.NetworkProfile.NetworkInterfaces.Id -contains $_.Id } diff --git a/src/Network/Network/help/Update-AzVirtualHub.md b/src/Network/Network/help/Update-AzVirtualHub.md index bdac30835024..ab66c9efaa53 100644 --- a/src/Network/Network/help/Update-AzVirtualHub.md +++ b/src/Network/Network/help/Update-AzVirtualHub.md @@ -46,8 +46,8 @@ The **Update-AzVirtualHub** cmdlet updates a virtual hub. ```powershell New-AzResourceGroup -Location "West US" -Name "testRG" $virtualWan = New-AzVirtualWan -ResourceGroupName "testRG" -Name "myVirtualWAN" -Location "West US" -New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.1.0/24" -Update-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.2.0/24" +$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.1.0/24" +Update-AzVirtualHub -InputObject $virtualHub -AddressPrefix "10.0.2.0/24" ``` ```output diff --git a/src/Network/Network/help/Update-AzVirtualNetworkGatewayNatRule.md b/src/Network/Network/help/Update-AzVirtualNetworkGatewayNatRule.md index fad6f9d31219..0ca5721df7f3 100644 --- a/src/Network/Network/help/Update-AzVirtualNetworkGatewayNatRule.md +++ b/src/Network/Network/help/Update-AzVirtualNetworkGatewayNatRule.md @@ -43,7 +43,7 @@ Update-AzVirtualNetworkGatewayNatRule -InputObject