1-1: Enumerate a User's (or Computer's) Group Memberships

Solution overview

Type of solution

Tool (Script)

Features and tools

Command-line commands, VBScript

Solution summary

Create a script to enumerate a user's (or computer's) group memberships.

Benefits

Answers the question, "What groups does ____ belong to?" Makes group memberships more visible than what is possible using the standard GUI toolset.

Preview

Figure 1-5 illustrates the output of a script that reports the group memberships of a user.

Group membership report script

Figure 1-5. Group membership report script

Introduction

Our first solution exemplifies a common approach to problem solving in this book. We start with a problem ...

Get Windows® Administration Resource Kit: Productivity Solutions for IT Professionals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.