This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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)] |
This file contains hidden or 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
| # FailoverMonitor.ps1 | |
| # Automatic Failover Monitoring and Execution Script | |
| # This script monitors Windows Events forwarded from servers and triggers | |
| # DNS failover when error patterns are detected that meet threshold criteria. | |
| # | |
| # Required dependencies: | |
| # - dnsFailover.ps1 in the same directory | |
| # - Windows Event Forwarding properly configured | |
| # - Appropriate permissions for DNS and IIS operations |
This file contains hidden or 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
| # Enhanced Service State Monitor with Automatic gMSA Detection | |
| # Version: 1.0 - PowerShell 5 Compatible | |
| # Supports automated execution via Task Scheduler | |
| #Requires -Version 5.0 | |
| #Requires -RunAsAdministrator | |
| #Requires -Modules ActiveDirectory | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(ValueFromPipeline = $true)] |
This file contains hidden or 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
| [CmdletBinding()] | |
| param( | |
| [Parameter(Mandatory=$false)] | |
| [string]$iisAppPoolPattern = "LoanAlterations*", | |
| [Parameter(Mandatory=$false)] | |
| [string]$computerName = $env:COMPUTERNAME, | |
| [Parameter(Mandatory=$false)] | |
| [int]$maxWaitTime = 30, |