How to get Local and Global Group Memberships in Command Line

I have been looking around a way to get all the Local and Global Group Memberships in command line for the past few days. Initially this issue was raised by one of my colleagues at work and he asked me whether I know how to get all the groups that a user in Active Directory is member of.


net users rdenawaka /domain