How to run a PowerShell script against multiple Active Directory domains with different credentials

collage
collage

I was working with a customer recently who needed to execute the same script against servers in different Active Directory domains. They had administrative privileges in each domain, but each domain used a different account. You could apply this same scenario to running one query against domain controllers in different domains. Today we’ll explore one…

2

Install the Active Directory PowerShell Module on Windows 10

Today I share a script to automate all of the manual steps involved with setting up the Active Directory PowerShell module on your Windows 10 workstation. Clickety, Click. Scripty, script. I recently reloaded my everyday work laptop. After three years it had in-place upgrades from Windows 8 to Windows 8.1 to Windows 10. You can…

8

Forensics: Automating Active Directory Account Lockout Search with PowerShell (an example of deep XML filtering of event logs across multiple servers in parallel)

Overview Today we learn how to efficiently filter event log queries, going beyond simple event ID filtering into the specific values of the XML message data. Then we will run this filter against multiple servers in parallel for faster data collection. This posts meets the following objectives: Add some efficiencies to my previous popular post…

16

Let's meet up in North Carolina Monday evening (8/10)

This is a quick announcement that I'll be in Raleigh/Durham, North Carolina this coming Monday night, August 10th. I'll be speaking on one of my favorite topics (Active Directory PowerShell) at the Research Triangle PowerShell User Group. Find out more information here. Hope to see you there!

0

Configuring Active Directory with PowerShell DSC and the New xADRecycleBin Resource

Active Directory and PowerShell DSC Today’s post is the second in a series on using PowerShell DSC with Active Directory. We will demonstrate configuring the AD Recycle Bin and domain trusts with PowerShell Desired State Configuration. As a bonus we will throw in a registry key for some special logging on the domain controller. Continuing…

0

UPDATED: Copy and Merge Group Policies (GPOs) with PowerShell

  GPO Consolidation Redux Do you have Group Policies gone wild? Did you realize too late that it might not be such a good idea to delegate GPO creation to half the IT department? Have you wanted to combine multiple policies into one for simplicity? This blog post is for you. One of my most…

12

Deploy Active Directory with PowerShell DSC (a.k.a. “DSC-PROMO”)

Active Directory and PowerShell DSC Today’s post is the first in a series on using PowerShell DSC with Active Directory. I don’t know how many blog posts there will be. I haven’t written them yet. What I can tell you, is that I have a load of fun scripts to share. Today we will start…

13

Forensics: Audit Group Policy Links and Changes with PowerShell

Honorary Scripting Guy I would like to thank Ed and Teresa Wilson, the Microsoft Scripting Guy and the Scripting Wife, for bestowing upon me the title of Honorary Scripting Guy. This was a humbling surprise. It has been a joy to share my scripting passion with the community, and I will continue to do so….

13

Forensics: Monitor Active Directory Privileged Groups with PowerShell

Someone just now added Jimmy to the Domain Admins group! How do I know? Because I used PowerShell to check. Let me show you how. Some of the best customers that I visit get email pages when high value group memberships change. Obviously this is strongly encouraged for IT shops of any size. Of course…

12