title: Unable to shutdown an Azure VM - can not get control of it and still getting charged for it
body: <p>I'm running <code>Stop-AzureVM</code> command and get the following error.</p>
  
  <p>As I understand it the only way to shutdown a VM and not get charged for it is via this PowerShell command. </p>
  
  <p>How can I Shutdown and Deallocate this VM or otherwise stop being charged for it?</p>
  
  <pre><code>PS C:\Windows\system32&gt; Stop-AzureVM -Name "SQL1" -ServiceName "my-svc-name" -Force -Verbose
  VERBOSE: 10:51:17 AM - Completed Operation: Get Deployment
  VERBOSE: 10:51:17 AM - Begin Operation: Stop-AzureVM
  Stop-AzureVM : InternalError : The server encountered an internal error. Please retry the request.
  At line:1 char:1
  + Stop-AzureVM -Name "SQL1" -ServiceName "ec-spsvcname2" -Force -Verbose
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : CloseError: (:) [Stop-AzureVM], CloudException
      + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.StopAzureVMCommand
  
  VERBOSE: 10:51:52 AM - Completed Operation: Stop-AzureVM
  </code></pre>
  
  <p>I can connect to the VM and shut it down, but its then not deallocated.
  I've tried restarting the VM, shutting down the VM through the portal, which doesn't work either, but the PowerShell still gives the same error.</p>
  
  <p><strong>Update</strong><br>
  This link indicates the status needs be stopped deallocated.
  <a href="http://social.msdn.microsoft.com/Forums/windowsazure/en-US/f608528e-a9f8-45b3-8d23-4211168cc087/stopped-deallocated" rel="nofollow">http://social.msdn.microsoft.com/Forums/windowsazure/en-US/f608528e-a9f8-45b3-8d23-4211168cc087/stopped-deallocated</a></p>
  
  <p>This link -<a href="http://www.windowsazure.com/en-us/pricing/details/virtual-machines/" rel="nofollow">http://www.windowsazure.com/en-us/pricing/details/virtual-machines/</a> - states
  states <code>If the VM status is "Stopped" you are still being billed. Only status "Stopped (Deallocated)" means that VM is no longer incurring charges.</code>  </p>
  
  <p>However, it also states you can stop the VM through the portal to stop being charged, this I believe is incorrect - as far as I know you cant get to "stopped (deallocated)" through the portal. Only through PowerShell.</p>
  
  <p><strong>Update</strong> 
  I've updated the question title, as getting charged for it is only part of the problem, I would like to regain control of it.</p>