Windows Tip Sheet

Net Some Groups

Use the Net group command to give you network Who's Who.

I showed you how to use the venerable Net user command to get some fast information about local and domain user accounts last week. One piece of information from the Net User command that's real helpful is group membership. To see who else might be in one of those groups you can use another Net command.

If the user account is local, say on a member server, and you saw that it belonged to the Administrators group, then run this command:

Net localgroup administrators

and you'll see all the members of this group. By the way, domain controllers also have built-in local groups like Account Operators and Server Operators, not to mention administrators. To check these group memberships, you can still use net localgroup but you need to add the /domain switch like this:

Net localgroup "server operators" /domain

and you'll need to enclose in quotes the group name if it has a space.

But what about domain groups that the user belongs to? For that, you can use Net group. If you happen to be on the domain controller you can simply type:

Net group "domain users"

But you don't need to go to a domain controller. You can get this information from your desktop by using -- what else? -- /domain:

Net group "Enterprise Admins" /domain

If you want to see a list of all local groups or all domain groups, all you need are these commands:

Net localgroup
Net localgroup /domain
Net group /domain

Tech Help -- Just An
E-Mail Away

Got a Windows, Exchange or virtualization question or need troubleshooting help? Or maybe you want a better explanation than provided in the manuals? Describe your dilemma in an e-mail to the MCPmag.com editors at [email protected]; the best questions get answered in this column and garner the questioner with a nifty Redmond T-shirt.

When you send your questions, please include your full first and last name, location, certifications (if any) with your message. (If you prefer to remain anonymous, specify this in your message, but submit the requested information for verification purposes.)

There are some limitations. You can't easily control the output formatting. The Net group command also doesn't understand organizational units. Yet, if you want a fast list of who is in a particular group, either local or domain, you can't go wrong with this oldie but still a goodie.

About the Author

Jeffery Hicks is an IT veteran with over 25 years of experience, much of it spent as an IT infrastructure consultant specializing in Microsoft server technologies with an emphasis in automation and efficiency. He is a multi-year recipient of the Microsoft MVP Award in Windows PowerShell. He works today as an independent author, trainer and consultant. Jeff has written for numerous online sites and print publications, is a contributing editor at Petri.com, and a frequent speaker at technology conferences and user groups.

comments powered by Disqus
Most   Popular