remove RMM with Procedure/script?

We have some endpoints which were moved from a very old account where we installed RMM Agent Service to the endpoints. We recently moved endpoints to a new USA account with help of migration script (thank you) . But now we see the RMM Agent Service is still installed on the endpoints and still enabled for the old account.

Is there a Procedure we can use or create to silently remove the RMM Agent Service from the endpoints? Thank you for any info.

Hello @ithelps
Please check the following script to uninstall the RMM agent from the endpoints.

Thank you, Rick