New-AzDeployment `
-Location '<Azure location>' `
-TemplateFile 'https://raw.githubusercontent.com/Azure/avdaccelerator/main/workload/arm/brownfield/deployAppAttachToolsVM.json' `
-adminUsername '<Local Admin User Name>' `
-adminPassUseKv false `
-adminPassword '<Password for Local Admin Account>' `
-publicIPAllowed '<true or false (Determines if NIC will have a Public IP Address)>' `
-OSoffer 'WindowsDesktop' `
-SubnetName '<Name of Subnet where VM will be attached.>' `
-vmDiskType '<Standard_LRS, StandardSSD_LRS or Premium_LRS>' `
-vmName '<Name for VM>' `
-VNet '<Object value surrounded by {} with comma seperated key pairs for desired VNet name, id, location and subscriptionName>' `
-Verbose
Please find a fix below :
$Vnet = @{
"name" = '<Virtual NetworkName>'
"id" = '<Virtual Network Id>'
"location" = '<Azure location>'
"subscriptionName" = '<Subscription Name>'
}
$TemplateParameterObject = @{
"Location" = '<Azure location>'
"adminUsername" = '<Local Admin User Name>'
"adminPassUseKv" = $false
"adminPassword" = <Clear Text Password>
"publicIPAllowed" = '<$true or $false (Determines if NIC will have a Public IP Address)>'
"OSoffer" = 'Windows-11'
"OSVersion" = 'win11-23h2-ent'
"SubnetName" = '<Name of Subnet where VM will be attached.>'
"vmDiskType" = '<Standard_LRS, StandardSSD_LRS or Premium_LRS>'
"vmName" = '<Name for VM>'
"VNet" = $VNet
}
New-AzResourceGroupDeployment -ResourceGroupName $ResourceGroupName -TemplateUri 'https://raw.githubusercontent.com/Azure/avdaccelerator/main/workload/arm/brownfield/deployAppAttachToolsVM.json' -TemplateParameterObject $TemplateParameterObject -Verbose
Hi
The following code doesn't work
Please find a fix below :
You have a working code in my repo : https://github.com/lavanack/laurentvanacker.com/blob/master/Azure/Azure%20Virtual%20Desktop/MSIX/New-AzMSIXAppAttachVM.ps1#L191-L213