Copied to clipboard!

Active Directory & PowerShell

Domain Controllers, FSMO roles, Group Policy, AD replication, ACL management, and PowerShell ActiveDirectory cmdlets.

ActiveDirectory Module

AD User & Account Management

Everyday Active Directory user provisioning, unlocking, password resets, and auditing.

# Unlock locked user account
Unlock-ADAccount -Identity "jdoe"

# Reset password and require change at next login
Set-ADAccountPassword -Identity "jdoe" -NewPassword (ConvertTo-SecureString "P@ssw0rd123!" -AsPlainText -Force)
Set-ADUser -Identity "jdoe" -ChangePasswordAtLogon $true

# Find locked accounts
Search-ADAccount -LockedOut | Select-Name, SamAccountName, LastLogonDate

# Search users by attribute
Get-ADUser -Filter 'Enabled -eq $true -and Department -eq "IT"' -Properties EmailAddress, Title | Select Name, SamAccountName, EmailAddress, Title
ActiveDirectory Module

Groups, Computer Accounts & Membership

Managing Security/Distribution Groups and querying workstation domain accounts.

# Create Security Group
New-ADGroup -Name "SEC-VPN-Users" -GroupScope Global -GroupCategory Security -Path "OU=Groups,DC=domain,DC=com"

# Add member to group
Add-ADGroupMember -Identity "SEC-VPN-Users" -Members "jdoe", "asmith"

# Query computer OS versions
Get-ADComputer -Filter * -Properties OperatingSystem | Select Name, OperatingSystem

# Join Workstation to Domain
Add-Computer -DomainName "domain.com" -Credential (Get-Credential) -Restart
FSMO Management

FSMO Roles Query, Transfer & Seizure

Identify domain controllers holding FSMO roles and execute role transfers or emergency seizures.

# Query current FSMO role holders
Get-ADDomain | Select-Object SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster, InfrastructureMaster
Get-ADForest | Select-Object SchemaMaster, DomainNamingMaster

# Transfer FSMO roles to target DC
Move-ADDirectoryServerOperationMasterRole -Identity "DC02" -OperationMasterRole SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster, InfrastructureMaster

# Force Seize FSMO role (Use only when DC is permanently offline)
Move-ADDirectoryServerOperationMasterRole -Identity "DC02" -OperationMasterRole PDCEmulator -Force
GPO & Replication

GPO Diagnostics & Repadmin CLI

Troubleshoot AD replication topology, GPO evaluation, and ACL permissions.

# Force Group Policy update and generate report
gpupdate /force
gpresult /h C:\temp\GPO_Report.html /f

# AD Replication Diagnostics
repadmin /showrepl
repadmin /replsummary
repadmin /syncall /A /e

# Domain Controller Health Check
dcdiag /v /c /d /e /s:DC01.domain.com

# Inspect Active Directory ACLs using DSACLS
dsacls "OU=Workstations,DC=domain,DC=com"