Every so often (actually quite often!), I come across something and I think “I really should have known that!” (bit like the F7 key in a command window…). Some time ago, pre-.NET in fact, I was playing around with some VB/Win32 API code written by L.J. Johnson, and put together a simple app. to display (among other things) domain group membership. I’m sure I’m the last person to know this but Microsoft have a freely downloadable set of Windows XP Service Pack 2 Support Tools that includes whoami.exe that can display your SID and group membership:
C:\> whoami /USER /SID
[User] = “HOMEDOMAIN\mitch” S-1-5-21-1935655697-117609710-839522115-1003
C:\> whoami /GROUPS
[Group 1] = “HOMEDOMAIN \None”
[Group 2] = “Everyone”
[Group 3] = “HOMEDOMAIN \Debugger Users”
[Group 4] = “BUILTIN\Administrators”
[Group 5] = “BUILTIN\Users”
[Group 6] = “NT AUTHORITY\INTERACTIVE”
[Group 7] = “NT AUTHORITY\Authenticated Users”
[Group 8] = “LOCAL”
Saw this via Bart De Smet’s blog.