The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,969 other subscribers

Command Line Kung Fu: Episode #43: Users & Groups

Posted by jpluimers on 2015/12/29

I needed to compare the local group memberships on a few systems.

I knew there is the distinction between

  • net group (which despite documentation requires /domain as it does not support local groups: you get a nice NET HELPMSG 3515 error) and
  • net localgroup (which can either run locally or with /domain).

So I came up with this batch file thanks to Command Line Kung Fu:

for /F "skip=4 delims=*" %%g in ('net localgroup ^| find /v "The command completed successfully"') do @net localgroup "%%g"

It can be done in PowerShell too, but is more work.

Based on that and Beyond Compare I created some diff scripts.



One Response to “Command Line Kung Fu: Episode #43: Users & Groups”

  1. […] In the end the permissions were the same: the differences were in the local group memberships of domain groups. That was already covered in Command Line Kung Fu: Episode #43: Users & Groups. […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: