We have a xml file that defines a few ad usergroups that correspond to a specific CRM role.
I need a function to add and a function to delete roles for CRM 2013 (on-prem) users in powershell based on the AD usergroup name.
So in short: I specify a username or entityreference (I have those available) and adusergroup string. Those need to be lookedup in the xml file to find the corresponding CRM role and then that role needs to be added to that user.
I also need a function to delete a role from a user. Example code is just fine.