Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Change the User and Computer Account Description Attributes Each Time a User Logs On?

(image) Hey, Scripting Guy! How can I change the user and computer account Description attributes each time a user logs on? I’d like the Description to indicate who logged on, and when.-- GG(image) (image) (image) Hey, GG. This is actually a pretty good idea. One question we get asked all the time is this: “How can I get a list of all ...

How Can I Add All the Users from an Existing Active Directory Group to a New Group?

(image) Hey, Scripting Guy! How can I add all the users from an existing Active Directory group to a new group?-- TG(image) (image) (image) Hey, TG. So you have a group (we’ll call it Group A) and you want to create an exact replica of that group (we’ll call it Group B). If we were talking about Text File A and Text File B this would ...

How Can I Tell Whether a Group Member is a User, a Computer, or Another Group?

(image) Hey, Scripting Guy! How can I tell whether the member of a group is a user, a computer, or another group?-- ON(image) (image) (image) Hey, ON. Interesting question and - to tell you the truth - one we’d never really thought about. It’s easy enough to list all the members of a group; for example, here’s a script that reports ...

How Can I Count the Number of Times a User has Logged on to a Computer?

(image) Hey, Scripting Guy! How can I count the number of times a user has logged on to a computer?-- DE(image) (image) (image) Hey, DE. How can you count the number of times a user has logged on to a computer? Good question and, ultimately, the answer might be: you can’t. But let’s at least explore some possible solutions and see if ...