title: Powershell script to add and remove groups based on file in active directory
body: <p>Our organisation currently manually distributes and removes all rights in the active directory, which is a tiresome work.
  However I know that with PowerShell, it should be able to be done a lot faster than manually having to get a list and typing in every group to which a user should belong (Some users are part of 20-40 groups, which makes it cumbersome to type all the groups) and when we have to change groups people tend to end up having more rights cause some groups didn't get deleted and other human errors.</p>
  
  <p>So I would like to ask or get some pointers on how I should write a PowerShell script which does the following actions:</p>
  
  <ul>
  <li><p>Asks for the name of the user for which it has to change the groups (Possibly first name and last name asked separately).</p></li>
  <li><p>Removes all existing groups from the person (if he/she is member of any groups), possibly with an exclusion option which would be coming from a file (txt, csv or whatever).</p></li>
  <li><p>Adds groups to the person based on a list coming from a file (Again, txt, csv or whatever).</p></li>
  </ul>
  
  <p>If anyone could give some advise on how to start or links/pointers with tips it would be much appreciated as to me it seems like not an easy script to make (I could be wrong)</p>