Summarize Functionality
Export-DbaLogin with -ObjectLevel is great for auditing permissions. However, it hides a nasty surprise. The long scripts it produces fool you into thinking that you must have everything, but it misses permissions granted to the user/login's roles. It scripts the membership of the role and I think it also scripts the CREATE ROLE, but it does not script any permissions for it. There should be a way to opt into this.
Is there a command that is similiar or close to what you are looking for?
Yes
Technical Details
Export-DbaDbRole is quite close, but a switch letting Export-DbaLogin opt into that this what I want.