title: SCCM 2012 R2 Remove-CMDevice
body: <p>Greeting Everyone,</p>
  
  <p>Hoping someone has a quick insight but I am getting access denied on a service account using the PowerShell command Remove-CMDevice.
  This process is as per outlined here, <a href="https://technet.microsoft.com/en-us/library/jj821759(v=sc.20).aspx" rel="nofollow">https://technet.microsoft.com/en-us/library/jj821759(v=sc.20).aspx</a></p>
  
  <p>The account has permission to remove devices from SCCM and this works fine through the GUI but not the command line. I have been unable to find documentation on what permissions the account need to do this via command line, it works fine manually in the GUI.</p>
  
  <p>If anyone can shed light on this it will be wonderful, I do want to keep this service account as having as minimal permissions as possible.</p>
  
  <p>Many thanks,</p>
  
  <p>Edit to Add Image as follows, 
  <a href="https://i.stack.imgur.com/8rwyK.png" rel="nofollow"><img src="https://i.stack.imgur.com/8rwyK.png" alt="PowerShell Output from SCCM Console"></a></p>