This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save this script as Test-gMSAConfiguration.ps1 | |
param( | |
[Parameter(Mandatory = $true)] | |
[string]$gMSAName, | |
[Parameter(Mandatory = $false)] | |
[string]$ServiceName = "", | |
[Parameter(Mandatory = $false)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gMSA Service AutoFix Solution | |
# This script creates a reliable startup fix for services using gMSA accounts | |
# Save as Fix-gMSAService.ps1 | |
param( | |
[Parameter(Mandatory = $true)] | |
[string]$ServiceName, | |
[Parameter(Mandatory = $false)] | |
[int]$StartupDelaySeconds = 120, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save this script as Create-gMSAStartupFix.ps1 | |
param( | |
[Parameter(Mandatory = $true)] | |
[string]$ServiceName | |
) | |
# Service startup fix script content | |
$scriptContent = @" | |
# gMSA Service Startup Fix Script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save this script as Reset-gMSAServiceCredential.ps1 | |
param( | |
[Parameter(Mandatory = $true)] | |
[string]$ServiceName, | |
[Parameter(Mandatory = $false)] | |
[switch]$SetupAutoRestart = $false | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# autoFailoverMonitor.ps1 | |
# This script monitors the active server for COMException errors in EventLog | |
# and automatically triggers a complete failover cycle when threshold is met. | |
# Enhanced with simplified email reporting capabilities. | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $false)] | |
[ValidateSet("Dev", "Prod")] | |
[string]$Env = "Dev", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# COMExceptionEventSimulator.ps1 | |
# This script creates simulated COMException events in the Windows Event Log for testing purposes. | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $false)] | |
[int]$EventCount = 3, | |
[Parameter(Mandatory = $false)] | |
[int]$TimeSpanMinutes = 10, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[Parameter(Mandatory=$true)] | |
[int]$Days, | |
[Parameter(Mandatory=$false)] | |
[string[]]$LogNames = @("Application", "System"), | |
[Parameter(Mandatory=$false)] | |
[string]$OutputPath = "$env:USERPROFILE\Desktop\COMExceptionEvents.csv" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# autoFailoverMonitor.ps1 | |
# This script monitors the active server for COMException errors in EventLog | |
# and automatically triggers a complete failover cycle when threshold is met. | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $false)] | |
[ValidateSet("Dev", "Prod")] | |
[string]$Env = "Dev", | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# completeFailoverCycle.ps1 | |
# This script implements a complete failover cycle by: | |
# 1. Performing initial failover (A -> B) | |
# 2. Restarting the original server | |
# 3. Performing second failover (B -> A) | |
# All while using the existing dnsFailover_v2.ps1 script | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $false)] |
NewerOlder