A collection of standalone scripts for Windows and VMware infrastructure work: Active Directory and DNS audits, AD Certificate Services migration to Windows Server 2025, DFS capture and migration, server logon and configuration audits, vSphere inventory, and a Linux ACL backup tool. Each script runs on its own; there is no shared module.
| Script | What it does | Output |
|---|---|---|
ADTrustReport.ps1 |
Tests the computer trust (secure channel) of every Windows server in the domain in parallel, optionally repairs broken trusts (-AttemptRepair) |
HTML and CSV report |
ADSite-Audit.ps1 |
Compares DNS A records on each domain controller with AD sites and subnets to find hosts registered in the wrong site | CSV: mismatches, per-DC results, site summary |
DNSOpsAudit.ps1 |
Tests DNS on every domain controller: service health, resolution, zone replication, response time and forwarders | CSV per test plus a summary |
Test-DomainRelations.ps1 |
Short script: runs Test-ComputerSecureChannel on every computer in AD |
Objects to the pipeline |
For AD replication diagnosis and repair, see AD-Replication-Manager; for a fuller DNS audit, see DNS-Audit.
| Script | What it does |
|---|---|
ADCS-Backup-Configuration.ps1 |
Backs up a CA: database and keys (certutil), registry configuration, templates, IIS settings and certificates |
ADCS-Migrate-To-Windows2025.ps1 |
Restores that backup onto a new Windows Server 2025 host, for root or issuing CAs, with options to rename the CA and use alias-based CDP/AIA URLs |
Test-ADCS-Migration.ps1 |
Checks the backup and migration scripts and a backup folder before you run them (-TestType Backup, Migration or All, -SimulateOnly) |
Guides: ADCS-Migration-Documentation.md (full procedure), ADCS-Quick-Reference.md, ADCS-Microsoft-Compliance-Fixes.md.
| Script | What it does |
|---|---|
Get-DFSConfiguration-Enhanced.ps1 |
Captures DFS Namespace and Replication configuration with optional health checks; HTML, text and XML reports |
DFS-Migration-Tool.ps1 |
Migrates DFS configuration from a source server to a target, validates it, and rolls back (-Operation Migrate, Validate, Rollback or Test), with -DryRun |
Guides: DFS-Migration-Documentation.md, DFS-Enhanced-Documentation.md, DFS-Performance-Optimization-Guide.md.
| Script | What it does | Output |
|---|---|---|
Invoke-DomainServerAudit.ps1 |
Finds every Windows server in AD and audits them in parallel over PowerShell remoting: OS and hardware, disks, logged-on users and logon history, installed software, services and recent event log entries | HTML and CSV per server |
ServerAudit.ps1 |
A similar audit of the local server: logon history, current sessions, installed software, services and event log entries | HTML |
Get-ServerLogons.ps1 |
Lists logged-on users, session IDs and idle times on servers (by name or OU), with a CIM fallback when quser fails |
Console, CSV or HTML |
| Script | What it does |
|---|---|
Get-vSphereInventory.ps1 |
VM inventory with datastore and disk usage; CSV and HTML, with filters and a minimal mode |
Get-vSphereVMInventory.ps1 |
Simpler VM inventory to CSV |
Get-DatastoreVMStorage.ps1 |
Datastore capacity against VM allocation and usage |
| Script | What it does |
|---|---|
enhanced_acl_backup.py |
Backs up and restores ACLs for a directory tree (POSIX and NFSv4, plus ZFS, NTFS and CIFS modes), in parallel, with optional gzip compression and hash verification. See ACL-BACKUP.md |
- Windows PowerShell 5.1 or PowerShell 7 for the PowerShell scripts
- AD and DNS scripts: the ActiveDirectory and DnsServer modules (RSAT) and domain admin rights; remote scripts also need WinRM enabled on the targets
- ADCS scripts: run elevated on the CA servers
- DFS scripts: the DFSN and DFSR modules (RSAT DFS Management Tools)
- vSphere scripts: VMware PowerCLI (
Install-Module VMware.PowerCLIorVCF.PowerCLI) and read access to vCenter - ACL tool: Python 3.6+ on Linux with
getfacl/setfacl(POSIX) ornfs4_getfacl/nfs4_setfacl(NFSv4)
Each PowerShell script has comment-based help:
Get-Help ./ADTrustReport.ps1 -Full
./ADTrustReport.ps1 -NoInteractive -OutputPath C:\Reports
./Get-ServerLogons.ps1 -OUPath "OU=Servers,DC=contoso,DC=com" -ExportFormat HTML
./Get-vSphereInventory.ps1 -vCenterServer vcenter.contoso.com -ReportFormats CSV,HTML./enhanced_acl_backup.py backup /srv/data acls.json --compress
./enhanced_acl_backup.py restore acls.json.gz --dry-runADSite-Audit.ps1, DNSOpsAudit.ps1 and ServerAudit.ps1 take no parameters; run them and follow the prompts.
These scripts were written for specific environments and have been checked for syntax with the PowerShell parser, not run end to end in a test lab. Run anything that makes changes (ADTrustReport.ps1 -AttemptRepair, the ADCS migration, the DFS migration) in a test environment first, and use -DryRun or -SimulateOnly where offered.
MIT. See LICENSE.
Adrian Johnson · github.com/adrian207