Scripts: Active Directory

« All scripts

Text

Managing AD Groups with PowerShell

As a Windows system administrator, managing Active Directory (AD) groups is probably something you do every day. While you could use the Active Directory Users and Computers (ADUC) MMC snap-in, what happens when you need to manage groups across multiple domains or automate group management tasks? That’s where PowerShell comes in handy.

Read »
Powershell98 lines

PowerShell Script: Pull Domain Info from Any Domain-Joined PC

This script collects a snapshot of everything domain-related on the local machine: join status, logged-on users, secure channel health, time sync source, AD site, network config, and key AD domain details. Run it when you’re troubleshooting a domain issue and want all the relevant facts in one shot instead of running eight separate commands.

Read »
Powershell71 lines

Add a User to Multiple AD Groups at Once

This script takes a list of email addresses and adds those users to a defined set of AD groups, skipping anyone already a member. You’d run this when onboarding someone who needs access to several groups at once and you don’t want to click through ADUC five times.

Read »
Powershell198 lines

Copy AD Group Memberships Between Computers in Bulk

This script reads two CSV files — a list of source computers and a matching list of target computers — and copies every AD group membership from each source to its corresponding target. You’d run this when migrating machines, replacing hardware, or provisioning new endpoints that need to inherit an existing computer’s group assignments without doing it manually one by one.

Read »