Skip to content

Commit

Permalink
Update Readme.md (#690)
Browse files Browse the repository at this point in the history
Add var to PS and additional Azure CLI code block.
  • Loading branch information
JCoreMS authored Oct 21, 2024
1 parent f475dd2 commit d891033
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions workload/bicep/brownfield/appAttachToolsVM/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ The easiest method is to configure the deployment via the provided blue buttons
### PowerShell

```powershell
# Set Variables
$TemplateUri = "https://raw.githubusercontent.com/Azure/avdaccelerator/main/workload/arm/brownfield/deployAppAttachToolsVM.json"
$Vnet = @{
"name" = '<Virtual NetworkName>'
"id" = '<Virtual Network Id>'
"location" = '<Azure location>'
"subscriptionName" = '<Subscription Name>'
}
$TemplateParameterObject = @{
"Location" = '<Azure location>'
"adminUsername" = '<Local Admin User Name>'
Expand All @@ -45,5 +46,42 @@ $TemplateParameterObject = @{
"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
# Deploy Resources
New-AzResourceGroupDeployment -ResourceGroupName $ResourceGroupName -TemplateUri $TemplateUri -TemplateParameterObject $TemplateParameterObject -Verbose
```

### Azure CLI
```bash
# Set variables
templateUri="https://raw.githubusercontent.com/Azure/avdaccelerator/main/workload/arm/brownfield/deployAppAttachToolsVM.json"
resourceGroupName="<YourResourceGroupName>"
location="<AzureLocation>"
adminUsername="<LocalAdminUserName>"
adminPassword="<ClearTextPassword>"
publicIPAllowed="<true_or_false>"
osOffer="Windows-11"
osVersion="win11-23h2-ent"
subnetName="<SubnetName>"
vmDiskType="<Standard_LRS_StandardSSD_LRS_or_Premium_LRS>"
vmName="<VMName>"
vnetName="<VirtualNetworkName>"
vnetId="<VirtualNetworkId>"
subscriptionName="<SubscriptionName>"

# Deploy resources
az group deployment create \
--resource-group $resourceGroupName \
--template-uri $templateUri \
--parameters \
Location=$location \
adminUsername=$adminUsername \
adminPassword=$adminPassword \
publicIPAllowed=$publicIPAllowed \
OSoffer=$osOffer \
OSVersion=$osVersion \
SubnetName=$subnetName \
vmDiskType=$vmDiskType \
vmName=$vmName \
VNet="{\"name\": \"$vnetName\", \"id\": \"$vnetId\", \"location\": \"$location\", \"subscriptionName\": \"$subscriptionName\"}"
```

0 comments on commit d891033

Please sign in to comment.