View vmExtension.azuredeploy.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmName": {
"type": "string",
"metadata": {
"description": "Name of the VM"
}
}
View Get-VMIdFromJobId.ps1
workflow Get-VMIdFromJobId {
param(
    [Parameter(Mandatory=$true)]
    [STRING]$VMMJobId    
    )
    #Get VMM Connection Object
    $vmmcon = Get-AutomationConnection -Name "SCVMM"
    #Construct the VMM Credential