Release Date: October 22, 2025
Release Type: Major Release - Enterprise Ready
Author: Adrian Johnson
Commit: 86207f7
Files Added: 11 test files
Lines of Code: 3,687 lines
- 110+ automated tests covering all major components
- ~75% code coverage of critical functionality
- 6 test files:
SQLite-AuditDB.Tests.ps1(25+ tests)Invoke-AD-Audit.Tests.ps1(30+ tests)CloudModules.Tests.ps1(25+ tests)Integration.Tests.ps1(10+ tests)Utilities.Tests.ps1(20+ tests)RunTests.ps1(test runner with coverage)
- Unit tests for individual functions
- Integration tests for end-to-end workflows
- Performance tests with large datasets (10,000+ records)
- In-memory database testing (no file cleanup needed)
- Complete mocking of AD/Cloud dependencies
- Code coverage reporting (JaCoCo format)
- Multiple output formats (Console, NUnit, JUnit)
- Tag-based test filtering (Unit, Integration, Performance)
Tests/README.md- Complete testing guideTests/TESTING_GUIDE.md- 5-minute quick startTests/GET_STARTED.md- 2-minute ultra-quick startTests/IMPLEMENTATION_SUMMARY.md- Implementation overview
cd Tests
.\RunTests.ps1 # Run all tests (~30-60 seconds)
.\RunTests.ps1 -CodeCoverage # With coverage report
.\RunTests.ps1 -Tag "Integration" # Run specific testsCommit: cc8d7fb
Files Added: 2 pipeline files
Features:
- Automated test execution on push to
main/develop - Pull request validation
- Code coverage reporting (Codecov integration)
- PSScriptAnalyzer linting
- Test result publishing
- Artifact uploads (test results, coverage)
Jobs:
- Test Job: Runs 110+ Pester tests
- Lint Job: PSScriptAnalyzer code quality checks
- Build Status: Aggregated pass/fail reporting
Triggers:
- Push to main/develop branches
- Pull requests
- Manual workflow dispatch
Features:
- Multi-stage pipeline (Test → Package → Notify)
- Pester test execution with NUnit reporting
- Code coverage (JaCoCo format)
- Script Analyzer integration
- Module packaging for deployment
- Artifact publication
Stages:
- Test Stage:
- Pester tests with NUnit output
- PSScriptAnalyzer linting
- Package Stage:
- Creates module directory structure
- Publishes build artifact (runs on
mainbranch only)
- Notify Stage:
- Build status notifications
Commit: cc8d7fb
File: AD-Audit.psd1
Metadata:
- Module Name: AD-Audit
- Version: 2.0.0
- GUID:
8f4e3d2c-1a5b-4c9e-8f3d-2a1b5c9e8f3d - Author: Adrian Johnson
- PowerShell Version: 5.1+
- Editions: Desktop, Core
- License: MIT
| Function | Purpose |
|---|---|
Start-MAAudit |
Main audit orchestration |
Invoke-ADAudit |
Active Directory audit |
Invoke-EntraIDAudit |
Microsoft Entra ID audit |
Invoke-ExchangeAudit |
Exchange Online audit |
Invoke-SharePointTeamsAudit |
SharePoint/Teams audit |
Invoke-PowerPlatformAudit |
Power Platform audit |
Invoke-ComplianceAudit |
Compliance audit |
New-AuditReport |
HTML report generation |
New-AdvancedAuditReports |
Advanced analytics |
Initialize-AuditDatabase |
SQLite database creation |
Invoke-AuditQuery |
SQL query execution |
Decrypt-AuditData |
Decrypt audit archives |
- Required: ActiveDirectory
- Optional: Microsoft.Graph, ExchangeOnlineManagement, PnP.PowerShell, MicrosoftTeams, PowerApps.Administration
# Option 1: Import directly
Import-Module .\AD-Audit.psd1
# Option 2: Copy to modules path
Copy-Item -Path ".\AD-Audit" -Destination "$HOME\Documents\PowerShell\Modules\" -Recurse
Import-Module AD-Audit
# Option 3: PowerShell Gallery (future)
Install-Module -Name AD-AuditCommit: cc8d7fb
Function: Send-AuditNotification in Run-M&A-Audit.ps1
- Automated email alerts on audit completion
- Beautiful HTML email with professional styling
- Gradient header (purple/blue theme)
- Responsive design (mobile-friendly)
- Metrics cards with completion summary
- Module breakdown (success/failure lists)
- Report links and output location
- Next steps checklist
Header:
- Title: "🎉 M&A Audit Complete"
- Company name subtitle
- Status badge (✓ COMPLETED / ⚠ COMPLETED WITH WARNINGS)
Metrics:
- Duration (minutes)
- Modules Completed count
- Modules Failed count
- Data Quality Score (%)
Sections:
- Successful Modules (✓ list)
- Failed Modules (✗ list with error log path)
- Output Location (file path)
- Generated Reports (list of HTML reports)
- Next Steps (recommended actions)
- Footer (execution details, timestamp)
# Basic usage
.\Run-M&A-Audit.ps1 `
-CompanyName "Contoso" `
-OutputFolder "C:\Audits" `
-NotificationEmail "admin@contoso.com"
# Custom SMTP (modify function)
SmtpServer = "smtp.gmail.com"
SmtpPort = 587
UseSsl = $true- Default: Office 365 (
smtp.office365.com:587) - Supports: Gmail, Exchange, SendGrid, custom SMTP
- Authentication: Credential parameter support
- Security: SSL/TLS enabled by default
Commit: cc8d7fb
File: docs/ENTERPRISE_FEATURES.md
- CI/CD Integration: GitHub Actions + Azure DevOps setup
- PowerShell Module: Installation and usage
- Email Notifications: Configuration and troubleshooting
- Combined Workflows: Enterprise deployment examples
- Best Practices: Security, performance, maintenance
- Troubleshooting: Common issues and solutions
- Updated
README.mdwith badges and v2.0.0 features - Added enterprise features section
- Included installation instructions
- Added CI/CD integration details
- Linked to new documentation
| Metric | Value |
|---|---|
| Test Files | 11 |
| Test Count | 110+ |
| Test Lines | 3,687 |
| Code Coverage | ~75% |
| CI/CD Pipelines | 2 (GitHub + Azure) |
| Documentation Files | 5 |
| Total Lines Added | 5,093+ |
- Pester Testing:
86207f7(3,687 lines, 11 files) - Enterprise Features:
cc8d7fb(1,406 lines, 6 files) - Total: 2 major commits
.github/workflows/test.yml- GitHub Actions workflowazure-pipelines.yml- Azure DevOps pipelineAD-Audit.psd1- PowerShell module manifestdocs/ENTERPRISE_FEATURES.md- Enterprise features guideTests/*.Tests.ps1- 6 test filesTests/RunTests.ps1- Test runnerTests/PesterConfiguration.psd1- Pester configTests/*.md- 4 documentation files
Run-M&A-Audit.ps1- Added email notification functionREADME.md- Updated with v2.0.0 features and badges
- ❌ No automated testing
- ❌ Manual quality checks
- ❌ No CI/CD integration
- ❌ No code coverage metrics
- ❌ No email notifications
- ❌ No professional packaging
- ✅ 110+ automated tests
- ✅ ~75% code coverage
- ✅ Automated CI/CD pipelines
- ✅ PSScriptAnalyzer linting
- ✅ Email notification system
- ✅ Professional PowerShell module
- ✅ Complete documentation
- ✅ Enterprise ready
cd Tests
.\RunTests.ps1Import-Module .\AD-Audit.psd1Start-MAAudit `
-CompanyName "Acme Corp" `
-OutputFolder "C:\Audits" `
-NotificationEmail "admin@company.com"- GitHub: Pipeline runs automatically on push
- Azure DevOps: Import
azure-pipelines.yml
docs/ENTERPRISE_FEATURES.md- Complete enterprise guideTests/README.md- Full testing documentationTests/TESTING_GUIDE.md- Quick start guide (5 min)Tests/GET_STARTED.md- Ultra-quick start (2 min)Tests/IMPLEMENTATION_SUMMARY.md- Implementation details
README.md- Added v2.0.0 features, badges, enterprise sectiondocs/DEVELOPMENT_PROGRESS.md- Updated with testing framework
- GitHub Repository: https://github.com/adrian207/AD-Audit
- GitHub Actions: https://github.com/adrian207/AD-Audit/actions
- Latest Release: https://github.com/adrian207/AD-Audit/releases/tag/v2.0.0
- Documentation: https://github.com/adrian207/AD-Audit/tree/main/docs
- Visual Query Builder - ServiceNow-style GUI (24-40 hours)
- Optional AD Components - ACL analysis, Kerberos delegation, DHCP (8-12 hours)
- Advanced Analytics - Trend analysis, anomaly detection (12-16 hours)
- PowerShell Gallery - Publish module to gallery
- Change Tracking - Compare audits over time
- Remediation Automation - Auto-fix hygiene issues
- Testing Framework: Pester 5.x
- CI/CD: GitHub Actions, Azure DevOps
- Author: Adrian Johnson adrian207@gmail.com
None - v2.0.0 is fully backward compatible with v1.x scripts and parameters.
- Fixed variable scoping in parallel processing (merged from PR #1)
- Resolved PSScriptAnalyzer linter warnings
- Improved error handling in server inventory
🎉 Version 2.0.0 - Enterprise Ready!
The M&A Audit Tool is now production-ready with:
- ✅ Comprehensive test coverage
- ✅ Automated CI/CD pipelines
- ✅ Professional packaging
- ✅ Email notifications
- ✅ Complete documentation
Ready to deploy in enterprise environments! 🚀