Data explorer query for transferring user from one group to another group

Hi all,

Do you happen to know the Data Explorer Query that helps to

  1. Remove List of user using email address from group “Employees”
  2. Add same users to group “Employee Emeritus”
  3. Set users profile permission “Silenced” to Yes
    Thank you for all the help.

I’m afraid the data explorer is read-only, so it can produce lists but not make any changes to your data.

Are there alternative methods or suggestions anyone can offer for creating this automation script? Any assistance or advice would be greatly appreciated.

Depending on how many people you’re needing to do this for, it may be easier to use the UI?

Admin will be allowed to do this ,Since admins have numerous emails to manage for these tasks, automation is necessary to streamline the process efficiently.