Skip to content

Releases: adrian207/Repl

v3.3.0 - Delta Mode

28 Oct 04:04

Choose a tag to compare

Release Notes - v3.3.0

Release Date: October 28, 2025
Author: Adrian Johnson [email protected]


🎯 Overview

Version 3.3.0 introduces Delta Mode - an intelligent caching system that makes monitoring 40-80% faster by only checking Domain Controllers that had issues in the previous run. Perfect for scheduled tasks and frequent monitoring scenarios.


🚀 Major Feature: Delta Mode

What is Delta Mode?

Delta Mode caches the results of each execution and uses that data to intelligently skip healthy DCs on subsequent runs. Instead of checking all 100 DCs every time, it only checks the 5-10 DCs that had issues last time.

Performance Impact

Scenario Full Scan Delta Mode Improvement
100 DCs, 5 with issues 8 minutes 30 seconds 94% faster
50 DCs, 10 with issues 4 minutes 50 seconds 79% faster
200 DCs, 20 with issues 15 minutes 2 minutes 87% faster

How It Works

Run 1 (Full Scan):
  ├─ Check all 100 DCs
  ├─ Find 5 DCs with issues
  └─ Save to delta cache

Run 2 (Delta Mode):
  ├─ Read delta cache
  ├─ Check only the 5 DCs with issues
  ├─ Skip 95 healthy DCs
  └─ Update delta cache

Run 3 (Delta Mode):
  ├─ Read updated cache
  ├─ Check DCs from Run 2 results
  └─ Continue...

✨ Key Features

1. 📦 Intelligent Caching

Automatically tracks which DCs had issues:

  • Degraded DCs
  • Unreachable DCs
  • DCs with replication failures
  • DCs with stale replication

Cache expires after 60 minutes (configurable) to ensure full scans happen periodically.


2. ⚡ Massive Performance Gains

Example: 100-DC Environment

# First run (establishes baseline)
.\Invoke-ADReplicationManager.ps1 -Mode Audit -Scope Forest
# Time: 8 minutes, found 5 DCs with issues

# Subsequent runs (delta mode)
.\Invoke-ADReplicationManager.ps1 -Mode Audit -Scope Forest -DeltaMode
# Time: 30 seconds, checks only 5 DCs
# Performance gain: 94% faster!

3. 🛡️ Safety Controls

Automatic Full Scans When:

  • No cache exists (first run)
  • Cache is expired (>60 min by default)
  • Previous run had no issues (confirms all DCs still healthy)
  • Cached DCs don't match current scope
  • -ForceFull parameter used

This ensures you never miss new issues on "healthy" DCs.


4. 🔧 Flexible Configuration

Control cache behavior with parameters:

Parameter Default Description
-DeltaMode Off Enable delta mode
-DeltaThresholdMinutes 60 Cache expiration (1-1440 minutes)
-DeltaCachePath $env:ProgramData\... Cache directory
-ForceFull Off Force full scan even with valid cache

💡 Usage Examples

Example 1: Basic Delta Mode

# First run: Full scan (establishes baseline)
.\Invoke-ADReplicationManager.ps1 -Mode Audit -Scope Forest

# Subsequent runs: Delta mode
.\Invoke-ADReplicationManager.ps1 -Mode Audit -Scope Forest -DeltaMode

Output:

Delta Mode enabled (threshold: 60 minutes)
Delta cache valid (age: 15.3 minutes)
Delta Mode: Delta scan - Previous issues on 5 DCs
Performance gain: Skipping 95 DCs (95.0% reduction)
Target DCs for execution: 5

Example 2: Scheduled Task with Delta Mode

# Create hourly monitoring with delta mode
.\Invoke-ADReplicationManager.ps1 `
    -CreateScheduledTask `
    -TaskSchedule Hourly `
    -Mode Audit `
    -Scope Forest `
    -DeltaMode `
    -FastMode `
    -SlackWebhook "https://hooks.slack.com/..." `
    -EmailNotification OnIssues

Benefits:

  • 1st run: Full scan (8 min) - establishes baseline
  • 2nd-Nth runs: Delta scan (30 sec) - 94% faster
  • Hourly execution: Catches issues within 1 hour
  • Low overhead: Minimal impact on DCs

Example 3: Custom Cache Expiration

# Check problematic DCs more frequently
.\Invoke-ADReplicationManager.ps1 `
    -Mode Audit `
    -DeltaMode `
    -DeltaThresholdMinutes 30  # Cache expires after 30 minutes

Use case: Production environments where you want full scans every 30 minutes but delta scans in between.


Example 4: Force Full Scan

# Override delta mode and force full scan
.\Invoke-ADReplicationManager.ps1 `
    -Mode Audit `
    -Scope Forest `
    -DeltaMode `
    -ForceFull  # Ignores cache, scans all DCs

Use case: After major AD changes (new DC, site restructure, etc.)


Example 5: Delta Mode + Auto-Healing

# Combine delta mode with auto-healing for ultimate automation
.\Invoke-ADReplicationManager.ps1 `
    -Mode Repair `
    -Scope Forest `
    -DeltaMode `
    -AutoHeal `
    -HealingPolicy Conservative `
    -FastMode `
    -EnableHealthScore

Benefits:

  • Only checks DCs with issues (delta mode)
  • Automatically fixes eligible issues (auto-healing)
  • Fast execution (fast mode)
  • Tracks health trends (health score)

📊 Delta Statistics

Delta mode provides detailed statistics in execution logs:

Delta Mode enabled (threshold: 60 minutes)
Delta cache valid (age: 25.7 minutes)
Delta Mode: Delta scan - Previous issues on 8 DCs
Performance gain: Skipping 92 DCs (92.0% reduction)

Previous Scan Info:
  Timestamp: 2025-10-28T14:30:00
  Total DCs: 100
  Issues Found: 12
  
Current Execution:
  Target DCs: 8
  Time Saved: ~7.5 minutes

🔍 Technical Details

Cache File Structure

Location: $env:ProgramData\ADReplicationManager\Cache\delta-cache.json

Contents:

{
  "Timestamp": "2025-10-28T14:30:00.0000000-07:00",
  "TotalDCsScanned": 100,
  "DegradedDCs": ["DC05", "DC12"],
  "UnreachableDCs": ["DC99"],
  "AllIssueDCs": ["DC05", "DC12", "DC15", "DC23", "DC99"],
  "TargetDCsForNextRun": ["DC05", "DC12", "DC15", "DC23", "DC99"],
  "IssueCount": 12,
  "Mode": "Audit"
}

Cache Lifecycle

  1. First Run: No cache exists → Full scan → Create cache
  2. Second Run: Cache valid → Delta scan → Update cache
  3. After 60 min: Cache expired → Full scan → Refresh cache
  4. All Healthy: Previous run = 0 issues → Full scan to confirm

Automatic Cleanup

  • Old cache files (>7 days) are automatically deleted
  • Only latest cache is used
  • Cache is updated after every successful run

🎯 Best Practices

1. Start with Full Scan

Run without delta mode first:

# Establish baseline
.\Invoke-ADReplicationManager.ps1 -Mode Audit -Scope Forest

2. Use Appropriate Thresholds

Match threshold to your monitoring frequency:

Monitoring Frequency Recommended Threshold
Every 15 minutes 30 minutes
Hourly 60 minutes (default)
Every 4 hours 120 minutes
Daily 1440 minutes (24 hours)

3. Combine with Fast Mode

Maximum performance:

.\Invoke-ADReplicationManager.ps1 -DeltaMode -FastMode
# Up to 95% total performance improvement!

4. Force Full Scans Periodically

Schedule a weekly full scan:

# Daily: Delta mode
# Weekly: Full scan
$dayOfWeek = (Get-Date).DayOfWeek
$forceFull = ($dayOfWeek -eq 'Monday')

.\Invoke-ADReplicationManager.ps1 `
    -Mode Audit `
    -Scope Forest `
    -DeltaMode `
    -ForceFull:$forceFull

5. Monitor Cache Effectiveness

Check delta statistics in logs:

# Review execution log
$log = Get-Content "C:\Reports\ADRepl-*\execution.log"
$log | Select-String "Delta Mode|Performance gain"

📋 Parameters

Parameter Type Default Range Description
-DeltaMode Switch $false - Enable delta mode
-DeltaThresholdMinutes Int 60 1-1440 Cache expiration in minutes
-DeltaCachePath String $env:ProgramData\... - Directory for cache files
-ForceFull Switch $false - Force full scan ignoring cache

🔄 Compatibility

Backward Compatibility

  • 100% compatible with v3.2
  • ✅ Delta mode is opt-in via -DeltaMode switch
  • ✅ Default behavior unchanged (full scans)
  • ✅ All existing parameters work unchanged

Upgrade Path

# v3.2 (works in v3.3)
.\Invoke-ADReplicationManager.ps1 -Mode Audit -Scope Forest

# v3.3 (with delta mode)
.\Invoke-ADReplicationManager.ps1 -Mode Audit -Scope Forest -DeltaMode

📊 Script Statistics

Metric Value
Version 3.3.0
Lines of Code ~2,250 (+200 from v3.2)
New Parameters 4
New Functions 3
Total Functions 22

🐛 Bug Fixes

  • Improved cache file cleanup to prevent disk space issues
  • Enhanced error handling for cache read failures
  • Fixed edge case where scope changes weren't detected
  • Better handling of empty cache scenarios

📚 Documentation

  • ✅ Updated README.md with Delta Mode examples
  • ✅ Created RELEASE-NOTES-v3.3.md (this file)
  • ✅ Updated CHANGELOG.md with detailed v3.3.0 entry
  • ✅ Added Delta Mode section to documentation

🔮 What's Next (v3.4)

Based on the feature backlog:

  1. Multi-Forest Support - Cross-forest replication monitoring
  2. Excel Export - Rich XLSX reports with charts
  3. Comparison Reports - Before/after analysis
  4. Predictive Analytics - ML-based issue prediction

💬 Feedback & Support

Read more

v3.2.0 - Auto-Healing

28 Oct 03:54

Choose a tag to compare

Release Notes - v3.2.0

Release Date: October 28, 2025
Author: Adrian Johnson [email protected]


🎯 Overview

Version 3.2.0 introduces Auto-Healing - the most requested feature that transforms AD Replication Manager into an autonomous monitoring and remediation solution. This release implements intelligent, policy-based automated repair with comprehensive safety controls, rollback capability, and detailed audit trails.


🚀 Major Feature: Auto-Healing

What is Auto-Healing?

Auto-Healing enables automated, policy-driven remediation of AD replication issues without human intervention. It intelligently evaluates issues based on configurable policies, performs safe repairs, tracks all actions, and can automatically rollback failed operations.

Key Capabilities

1. 🎛️ Three Healing Policies

Policy Risk Level Categories Severities Use Case
Conservative Low StaleReplication Low, Medium Production - minimal risk
Moderate Medium StaleReplication, ReplicationFailure Low, Medium, High Balanced automation
Aggressive High All categories All severities Maximum automation

Conservative Policy:

.\Invoke-ADReplicationManager.ps1 `
    -Mode Repair `
    -AutoHeal `
    -HealingPolicy Conservative `
    -MaxHealingActions 5
  • Only fixes low-risk stale replication
  • Requires manual approval for failures
  • 30-minute cooldown between attempts
  • Maximum 3 concurrent actions

Moderate Policy:

.\Invoke-ADReplicationManager.ps1 `
    -Mode Repair `
    -AutoHeal `
    -HealingPolicy Moderate `
    -EnableRollback
  • Fixes stale replication + replication failures
  • Requires manual approval for connectivity issues
  • 15-minute cooldown
  • Maximum 5 concurrent actions
  • Automatic rollback on failure

Aggressive Policy:

.\Invoke-ADReplicationManager.ps1 `
    -Mode AuditRepairVerify `
    -AutoHeal `
    -HealingPolicy Aggressive `
    -MaxHealingActions 10 `
    -EnableRollback
  • Attempts to fix ALL detected issues
  • No manual approvals required
  • 5-minute cooldown
  • Maximum 10 concurrent actions
  • Automatic rollback on failure

2. 🔄 Rollback Capability

Auto-Healing includes intelligent rollback for failed actions:

# Enable automatic rollback on failures
.\Invoke-ADReplicationManager.ps1 `
    -Mode Repair `
    -AutoHeal `
    -EnableRollback

# Manual rollback of specific action
# (ActionID from healing-history.csv)
Invoke-HealingRollback -ActionID "abc123de" `
    -HistoryPath "C:\ProgramData\ADReplicationManager\Healing" `
    -Reason "Manual intervention required"

Rollback Features:

  • JSON-based rollback data with pre-action state
  • Fresh replication sync to restore state
  • Rollback history tracking
  • Automatic cleanup of old rollback files (>30 days)

3. 🛡️ Safety Controls

Multiple layers of protection prevent healing loops and ensure safety:

Cooldown Period:

  • Prevents repeated healing attempts on same issue
  • Configurable per-policy or via -HealingCooldownMinutes
  • Prevents healing loops and gives time for replication convergence

Action Limits:

  • -MaxHealingActions parameter (1-100, default: 10)
  • Policy-specific max concurrent actions
  • Protects against runaway automation

Eligibility Checks:

  • Category must be allowed by policy
  • Severity must be allowed by policy
  • Manual approval check
  • Cooldown period check
  • Actionability check

Audit Trail:

  • Every action logged to CSV (healing-history.csv)
  • JSON rollback files for detailed records
  • Timestamp, DC, category, severity, success/failure
  • Rollback history in separate CSV

4. 📊 Healing Statistics

Track auto-healing effectiveness over time:

# Get healing statistics for last 30 days
$stats = Get-HealingStatistics -HistoryPath "C:\ProgramData\ADReplicationManager\Healing" -DaysBack 30

$stats
# Output:
# TotalActions        : 145
# SuccessfulActions   : 138
# FailedActions       : 7
# RolledBackActions   : 3
# SuccessRate         : 95.17
# CategoriesHealed    : {StaleReplication: 89, ReplicationFailure: 56}
# TopDCs              : {DC03: 23, DC07: 19, DC12: 15, DC05: 12, DC01: 10}

📋 New Parameters

Parameter Type Default Description
-AutoHeal Switch $false Enable automatic healing with policy-based decisions
-HealingPolicy String Conservative Policy: Conservative, Moderate, or Aggressive
-MaxHealingActions Int 10 Maximum actions per execution (1-100)
-EnableRollback Switch $false Automatically rollback failed healing actions
-HealingHistoryPath String $env:ProgramData\... Directory for healing audit trail
-HealingCooldownMinutes Int 15 Minutes before re-attempting same issue (1-60)

🔧 New Functions

Public Functions

Function Purpose
Get-HealingPolicy Retrieves policy definitions (Conservative/Moderate/Aggressive)
Test-HealingEligibility Checks if issue qualifies for auto-healing
Save-HealingAction Records action to audit trail with rollback data
Invoke-HealingRollback Rolls back a healing action by ID
Get-HealingStatistics Retrieves healing metrics from history

💡 Usage Examples

Example 1: Conservative Auto-Healing with Scheduled Task

# Setup: Create daily monitoring with safe auto-healing
.\Invoke-ADReplicationManager.ps1 `
    -CreateScheduledTask `
    -TaskSchedule Daily `
    -TaskTime "02:00" `
    -Mode AuditRepairVerify `
    -Scope Forest `
    -AutoHeal `
    -HealingPolicy Conservative `
    -EnableHealthScore `
    -SlackWebhook "https://hooks.slack.com/..." `
    -EmailTo "[email protected]" `
    -SmtpServer "smtp.company.com"

What it does:

  • Runs daily at 2 AM
  • Audits all DCs in forest
  • Auto-heals only stale replication (low risk)
  • Tracks health score trends
  • Sends Slack + email notifications
  • Full audit trail

Example 2: Moderate Policy for Production

# Production monitoring with balanced automation
.\Invoke-ADReplicationManager.ps1 `
    -Mode AuditRepairVerify `
    -Scope Site:Production `
    -AutoHeal `
    -HealingPolicy Moderate `
    -MaxHealingActions 5 `
    -EnableRollback `
    -FastMode `
    -AuditTrail `
    -EnableHealthScore

What it does:

  • Audits Production site DCs
  • Auto-heals stale replication + failures
  • Limits to 5 actions max
  • Automatic rollback if repairs fail
  • Fast execution (40-60% faster)
  • Complete transcript logging
  • Health score tracking

Example 3: Aggressive Policy for Test Environment

# Test/Dev environment with maximum automation
.\Invoke-ADReplicationManager.ps1 `
    -Mode AuditRepairVerify `
    -Scope Forest `
    -AutoHeal `
    -HealingPolicy Aggressive `
    -MaxHealingActions 20 `
    -EnableRollback `
    -HealingCooldownMinutes 5 `
    -FastMode `
    -AutoRepair

What it does:

  • Attempts to fix ALL issues automatically
  • No manual prompts (fully automated)
  • Up to 20 actions per run
  • Short 5-minute cooldown
  • Automatic rollback capability
  • Fast Mode enabled

Example 4: Review Healing History

# Analyze healing effectiveness
$history = Import-Csv "C:\ProgramData\ADReplicationManager\Healing\healing-history.csv"

# Last 7 days of healing actions
$recentActions = $history | Where-Object {
    ([DateTime]$_.Timestamp) -gt (Get-Date).AddDays(-7)
}

# Success rate by DC
$recentActions | Group-Object DC | Select-Object Name, Count, @{
    Name='SuccessRate'
    Expression={[Math]::Round((($_.Group | Where-Object {$_.Success -eq 'True'}).Count / $_.Count) * 100, 2)}
} | Sort-Object SuccessRate

# Most common issues healed
$recentActions | Group-Object Category | Sort-Object Count -Descending

Example 5: Manual Rollback

# View recent healing actions
$history = Import-Csv "C:\ProgramData\ADReplicationManager\Healing\healing-history.csv" |
    Sort-Object Timestamp -Descending | Select-Object -First 10

# Rollback a specific action
Invoke-HealingRollback -ActionID "abc123de" `
    -HistoryPath "C:\ProgramData\ADReplicationManager\Healing" `
    -Reason "DC experiencing issues after healing"

🎯 Benefits

For Operations Teams

  • Reduced MTTR - Issues fixed in minutes instead of hours
  • 24/7 Monitoring - Auto-healing works while you sleep
  • Consistent Remediation - Same fix applied every time
  • Detailed Audit Trail - Complete history for compliance

For Administrators

  • Policy-Based Control - Choose your risk tolerance
  • Safety First - Multiple protections against runaway automation
  • Rollback Capability - Undo actions if needed
  • Learning System - Cooldowns prevent healing loops

For Management

  • Reduced Incidents - Catch issues before users notice
  • Lower Operational Costs - Less manual intervention
  • Improved SLAs - Faster issue resolution
  • Compliance Ready - Full audit trail with timestamps

🔍 How Auto-Healing Works

┌─────────────────────────────────────────────────────────────┐
│                     1. AUDIT PHASE                          │
│   Discover DCs → Collect snapshots → Identify issues       │
└────────────────────────┬────────────────────────────────────┘
                         │
                         ▼
┌──────────────────────────...
Read more

v3.1.0 - Notifications and Monitoring

28 Oct 03:41

Choose a tag to compare

🚀 What's New in v3.1.0

This feature release adds three major capabilities that transform AD Replication Manager into a complete monitoring solution:

🎯 Key Features

📬 Slack & Microsoft Teams Integration

  • Real-time alerts with rich formatting and emoji indicators
  • Color-coded notifications based on health status
  • Adaptive cards for Teams with structured data

⏰ Scheduled Task Auto-Setup

  • One-command automated monitoring
  • Multiple schedule options (Hourly, Every4Hours, Daily, Weekly)
  • Automatic task registration with SYSTEM privileges

📊 Health Score & Historical Trends

  • 0-100 numerical health score with letter grades (A+ to F)
  • CSV-based historical tracking for trend analysis
  • Automatic cleanup of old snapshots (90+ days)

⚡ Performance Enhancements

  • Fast Mode: 40-60% faster execution with -FastMode switch
  • Retry Logic: Exponential backoff with intelligent error classification
  • Resilience: Better handling of transient network failures