99% of the credit goes to the author of the code from stack overflow I got from here https://stackoverflow.com/questions/35344825/powershell-export-user-rights-assignment
I just made a few modifications for finding non admin accounts with special permissions.