#Requires -Version 3.0 Param( [string] $ResourceGroupLocation = 'northeurope', [string] $ResourceGroupName = 'PuzzelDynamicsLogicApp', [string] [Parameter(Mandatory=$true)] $DynamicsAppId , [string] [Parameter(Mandatory=$true)] $DynamicsBaseURL , [string] [Parameter(Mandatory=$true)] $PuzzelClientId , [string] [Parameter(Mandatory=$true)] $PuzzelUser , [string] [Parameter(Mandatory=$true)] $PuzzelPassword , [string] [Parameter(Mandatory=$true)] $PuzzelAccessPoint , [string] [Parameter(Mandatory=$true)] $WidgetURI ) if ($null -eq (Get-AzResourceGroup -Name $ResourceGroupName -Location $ResourceGroupLocation -Verbose -ErrorAction SilentlyContinue)) { New-AzResourceGroup -Name $ResourceGroupName -Location $ResourceGroupLocation -Verbose -Force -ErrorAction Stop } $ParametersObj = @{ DynamicsAppId = "$DynamicsAppId" DynamicsBaseURL = "$DynamicsBaseURL" PuzzelClientId = "$PuzzelClientId" PuzzelUser = "$PuzzelUser" PuzzelPassword = "$PuzzelPassword" PuzzelAccessPoint = "$PuzzelAccessPoint" WidgetURI = "$WidgetURI" } New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName ` -TemplateUri 'https://puzzelconnected.azurewebsites.net/Dynamics/template.json'` -TemplateParameterObject $ParametersObj