Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is there a way (in Windows) to delineate the roles my login has on the box I'm logged in to?

The machine is joined to a domain, if that makes a difference.

share|improve this question
    
What roles?? Like the groups you're a member of? –  Chris S Oct 14 '10 at 17:27
    
Say my account is a member of Remote Desktop Users because of a domain group I'm a part of that was added as a member of that group on the local box - I'd like to see that I'm a member of that group. I'd be fine with either groups or permissions, I guess. –  arootbeer Oct 14 '10 at 17:32

2 Answers 2

up vote 3 down vote accepted

If you are ready to do some coding, you can use following commands to get the information you want. When executed separately these commands give the information in bits and pieces.

C:\>net localgroup

This will give list of all local groups. Iterate on this list and execute

C:\>net localgroup <groupName>

This will give list of all members (users and groups which are added to this local group).

To get the list of all domain groups, you are part of, you can execute

C:\>net user <username> /domain

Look for Global Group memberships in the output. PS: /domain is a keyword. Don't replace it with your domain name.

Now if your user name or the Global Groups are part of the members list of any local group (output of second command), then it is the role assigned to you.

Unfortunately, these commands output more data / text than what you want. So you will need to write some code (in your favorite language or even .bat file) to parse and combine the output of above commands.

It will be worth writing a program if you repeatedly need to find roles of a user.

share|improve this answer
    
Thank you - that's exactly what I was looking for –  arootbeer Oct 20 '10 at 18:59
    
Glad I could help. Btw, if you have written a program to combine the output of these commands, can you please share it somewhere. –  Vivek Athalye Oct 23 '10 at 11:30

You can use LG from joeware to do more than you would be able to do with "net localgroup", which only lists the groups that are on your machine. This should give you the direction you need.

It's a simple command line app: you can download it here link

This command will list the members of all the localgroups...

lg \\localhost -lu

You may want to look into powershell to write something that just pulls your groups in a more specific fashion.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.