📅  最后修改于: 2022-03-11 14:50:14.496000             🧑  作者: Mango
$subscription_id = ""
$NetworkName = ""
$location = ""
$netrgname = ""
$AppServiceName = ""
$props = @{
"vnetResourceId" = "/subscriptions/$subscription_id/resourcegroups/$netrgname/providers/Microsoft.ClassicNetwork/virtualNetworks/$NetworkName";
"certThumbprint"= "";
"certBlob"= "";
"routes" = $null;
}
New-AzureRMResource -ResourceName "$AppServiceName/$AppServiceName-to-$NetworkName" -Location $location -ResourceGroupName MarcusWebsites -ResourceType Microsoft.Web/sites/virtualNetworkConnections -PropertyObject $props -ApiVersion "2015-08-01" -force