title: Trying to remove user from all groups in an Active Directory using PowerShell script
body: <p>I'm trying to use a PowerShell script to accept input from the user based on what user they want removed from all groups. Is my syntax wrong? Here's what I have so far.</p>
  
  <pre><code>$User1 = Read-Host -Prompt 'Enter the username of the employee you wish to change'
  
  Get-ADUser -Identity $User1 -Properties memberof |
      Select-Object -ExpandProperty memberof |
      Remove-ADGroupMember -Identity CISCOVPN, FS-001
  </code></pre>
  
  <p>Where CISCOVPN and FS-001 are two of the groups I want <code>$User1</code> removed from. Is there a way to just say remove from all groups?</p>