This commit is contained in:
Srđan Božović
2018-08-19 21:04:34 +02:00
parent 5eae488224
commit e9a22994b3
2 changed files with 3 additions and 3 deletions
@@ -42,7 +42,7 @@ To run this sample, you need the following prerequisites.
## Run this sample
Run the script below from either Windows or CloudShell
Run the script below from either Windows or Azure Cloud Shell
```powershell
@@ -6,7 +6,7 @@ $virtualNetworkName = $parameters['virtualNetworkName']
$subnetName = $parameters['subnetName']
$force = $false
If($args.Count > 1)
If($args.Length > 1)
{
$force = $args[1]
}
@@ -191,7 +191,7 @@ function Load-RouteTable {
$subnet.RouteTable -ne $null
)
{
$rtSegments = ($subnet.RouteTable.Id).Split("{/}", [System.StringSplitOptions]::RemoveEmptyEntries)
$rtSegments = ($subnet.RouteTable.Id).Split("/", [System.StringSplitOptions]::RemoveEmptyEntries)
$rtName = $rtSegments[-1].Trim()
$rtResourceGroup = $rtSegments[3].Trim()
$routeTable = Get-AzureRmRouteTable -ResourceGroupName $rtResourceGroup -Name $rtName