Bicep: Execute a RunCommand on already running Azure Virtual Machine
param vmName string
param location string
//https://learn.microsoft.com/en-us/azure/templates/microsoft.compute/2022-11-01/virtualmachines/runcommands?pivots=deployment-language-bicep
resource runCommand 'Microsoft.Compute/virtualMachines/runCommands@2022-11-01' = {
name: '${vmName}/runPowerShellCommand'
location: location
properties: {
source: {
script: 'Write-Host "Hello World"'
}
}
}