I am trying to use a PowerShell cmdlet to create a resource in Azure cloud:
$Gateway = New-AzApplicationGateway `
-Name $GatewayName `
-ResourceGroupName $ResourceGroupName `
-Location $Location `
-Sku $GatewaySku `
-GatewayIPConfigurations $GatewayIPconfig `
-FrontendIPConfigurations $FrontendIpConfig `
-FrontendPorts $FrontEndPort `
-Probes $HealthProbe `
-BackendAddressPools $PlatformBackendPool, $ApiBackendPool `
-BackendHttpSettingsCollection $PoolSettings `
-Force
This, however, ends with:
cmdlet New-AzApplicationGateway at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
GatewayIPConfigurations[0]:
$GatewayIPconfig.GetType() yields
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True False PSApplicationGatewayIPConfiguration Microsoft.Azure.Commands.Network.Models.PSChildResource
and the documentation for the cmdlet states that the signature is
New-AzApplicationGateway
...
-GatewayIPConfigurations <PSApplicationGatewayIPConfiguration[]>
...
Is this not the proper way to pass an array argument to a cmdlet?