Scripting

Anonymized scripts from the workshop and the day job. Copy, adapt, break, improve.

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 »
Powershell237 lines

Grant Shared Mailbox Permissions from AD Group Membership

This script assigns Full Access and Send As permissions on shared mailboxes by reading membership from two AD groups. Run it when you want AD groups to be the source of truth for mailbox delegation instead of managing permissions one user at a time.

Read »