title: The term 'Set-AzureRmVMPlan' is not recognized as the name of a cmdlet
body: <p>I am trying to create a VM on Azure using powershell script in Azure Automation. This VM is to be created from marketplace. So I need to use cmdlet 'Set-AzureRmVMPlan' in my script. </p>
  
  <blockquote>
    <p>$vm = New-AzureRmVMConfig -VMName $inVMName -VMSize $vmSize</p>
    
    <p>Set-AzureRmVMPlan -VM $vm -Publisher "kali-linux" -Product
    "kali-linux" -Name "kali"</p>
  </blockquote>
  
  <p>This script works fine when I run it from Powershell ISE however when I put this command in Azure Automation Runbook then Azure doesn't recognize this command. I get below error,</p>
  
  <blockquote>
    <p>Set-AzureRmVMPlan : The term 'Set-AzureRmVMPlan' is not recognized as
    the name of a cmdlet, function, script file, or </p>
    
    <p>operable program. Check the spelling of the name, or if a path was
    included, verify that the path is correct and try </p>
    
    <p>again.</p>
    
    <p>At restore-vhd-backups:8 char:8</p>
    
    <ul>
    <li><ul>
    <li><p>CategoryInfo          : ObjectNotFound: (Set-AzureRmVMPlan:String) [], CommandNotFoundException</p></li>
    <li><p>FullyQualifiedErrorId : CommandNotFoundException</p></li>
    </ul></li>
    </ul>
  </blockquote>
  
  <p>So I further investigate and found that this command is not available in cmdlet list at page "Edit PowerShell Runbook" (see below image)
  <a href="https://i.stack.imgur.com/IDwvr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IDwvr.png" alt="CMDLET List in Azure Portal Automation Runbook Edit"></a>
  <a href="https://i.stack.imgur.com/Al1Fv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Al1Fv.png" alt="CMDLET in Powershell ISE"></a></p>
  
  <p>I also got to know that this cmdlet was added in Azure Powershell last year from below link </p>
  
  <p><a href="https://stackoverflow.com/questions/35871496/how-to-include-plan-information-when-creating-arm-vm-from-a-captured-image-usi">How to include &quot;Plan information&quot; when creating ARM VM from a captured image using Powershell?</a></p>
  
  <p>Can someone help me on this?</p>