Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! How Can I Remove Everything From an Active Directory Group Except Other Groups?

Hey, Scripting Guy! How can I remove all the members of a group unless that member is another group? I need a group that has only other groups as members, no individual users, computers, contacts, etc.-- TH Hey, TH. You’ll have to be patient with us this morning; after all, we’re sending this column over the Internet and, well, you know...

Hey, Scripting Guy! How Can I Determine the Manager for All the Groups in Active Directory?

Hey, Scripting Guy! How can I return a list of all my Active Directory groups, along with the name of the user responsible for each group?-- PL Hey, PL. You know, we realize that most of you are thinking, “Wow, this has been a busy month for you Scripting Guys. You guys really deserve to take some time off.” Well, as much as we’d like...

Hey, Scripting Guy! How Can I Retrieve Time Zone Information for a Computer?

Hey, Scripting Guy! How can I retrieve time zone information for a computer?-- AL Hey, AL. You know, over the Thanksgiving Day weekend the Scripting Guy who writes this column took some time to think about his job, and to think of ways in which he could do that job even better. (Note to the Scripting Editor: Believe it or not, the Scripting...

Hey, Scripting Guy! How Can I Randomly Assign a Picture From the My Pictures Folder as the Computer Wallpaper?

Hey, Scripting Guy! I saw your column on randomly assigning a picture to use as the wallpaper on a computer. I’d like to do the same thing, except that, instead of picking from a predefined list of pictures, I’d like to randomly assign a picture from the user’s My Pictures folder. How do I do that?-- JJ Hey, JJ. You know, this has ...

Hey, Scripting Guy! How Can I Tell If a Time Occurred in the Morning or the Evening?

Hey, Scripting Guy! Given a time of day, is there an easy way to tell whether that’s a morning time or an evening time?-- HG Hey, HG. Can you feel the excitement in the year, that sense of anticipation, the crackling energy and the flow of adrenalin? That can only mean one thing: the annual Turducken Bowl is upon us. On the off-chance ...

Feedback usabilla icon