Tag: PowerShell

Create Active Directory Users from CSV with PowerShell

Bulk-create AD users from a CSV in seconds instead of clicking the ADUC wizard for hours. Covers designing the CSV template, generating strong passwords, finding the target OU's distinguishedName, importing the file with Import-Csv, and the Add-NewUsers.ps1 script that splats parameters into New-ADUser with a duplicate check and try/catch error handling.

Secure Active Directory Passwords from Breaches

Audit and harden Active Directory against breached passwords using Lithnet Password Protection and the Have I Been Pwned compromised hash list. Covers installing Lithnet PP on a Domain Controller, syncing the HIBP store, running the Audit-Passwords.ps1 script to find pwned accounts, and configuring the GPO that rejects new pwned passwords on every set/change.

How to Check FSMO Roles in Active Directory

Three reliable ways to check FSMO role holders in Active Directory: the netdom query FSMO command, the Get-ADForest/Get-ADDomain PowerShell cmdlets (and the Get-ADInfo.ps1 script), and the GUI walkthrough across Active Directory Schema, Active Directory Domains and Trusts, and Active Directory Users and Computers.

Configuring Group Managed Service Accounts (gMSA)

Learn how to configure Group Managed Service Accounts (gMSA) in Active Directory. This step-by-step guide covers creating the KDS Root Key, creating and installing the gMSA with New-ADServiceAccount and Install-ADServiceAccount, verifying with Test-ADServiceAccount, and configuring Services.msc to use the account with automatic password rotation.

Permanently Delete Objects from the Active Directory Recycle Bin

Learn how to permanently delete objects from the Active Directory Recycle Bin using PowerShell. This guide explains why the ADAC GUI cannot permanently delete recycled objects and shows the exact Get-ADObject and Remove-ADObject commands to safely and irreversibly remove an AD object before its tombstone lifetime expires.

Configure Active Directory to Support Additional Domain Names

Add an alternative UPN suffix to your AD forest so users can sign in as user@infotechninja.com without renaming the domain. Walks the optional internal DNS zone, the AD Domains and Trusts registration, the per-user assignment, and the Microsoft 365 hybrid pre-flight (domain verification, UPN audit, sign-in mode). Includes the Set-ADForest / Set-ADUser PowerShell equivalents and the common mistakes (wrong right-click, suffix vs email, forgetting public DNS validation).