From 0bd098588725d656871a1d89518ffd1387d3192e Mon Sep 17 00:00:00 2001 From: Rob3r70 Date: Thu, 16 Apr 2026 16:19:32 +0200 Subject: [PATCH 1/3] Add SYSTEM membership check for WSS_WPG group Updated script to check for SYSTEM membership in WSS_WPG group and added error handling for group membership check. --- Install-SPSE_Fix.ps1 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Install-SPSE_Fix.ps1 b/Install-SPSE_Fix.ps1 index 0faea60..7ea5017 100644 --- a/Install-SPSE_Fix.ps1 +++ b/Install-SPSE_Fix.ps1 @@ -42,6 +42,31 @@ param ( [bool]$ShouldGracefulStopDCache = $false ) +$GroupName = "WSS_WPG" +$SystemSID = "S-1-5-18" + +try { + $Members = Get-LocalGroupMember -Group $GroupName -ErrorAction Stop + + $IsMember = $Members | Where-Object { $_.SID -eq $SystemSID } + + if ($IsMember) { + Write-Host "❌ SYSTEM is a member of '$GroupName'" -ForegroundColor Red + break + break + } + else { + Write-Host "✅ SYSTEM (S-1-5-18) is not a member of '$GroupName'" -ForegroundColor Green + } +} +catch { + Write-Host "❌ Error checking group membership: $($_.Exception.Message)" -ForegroundColor Red +} + + + + + # allow relative paths to work $CULocation = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PWD, $CULocation)) From 84b38f1d958b4d1e3456ec01d640a52bcd320d2c Mon Sep 17 00:00:00 2001 From: Rob3r70 Date: Thu, 16 Apr 2026 16:26:18 +0200 Subject: [PATCH 2/3] Update Install-SPSE_Fix.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Install-SPSE_Fix.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Install-SPSE_Fix.ps1 b/Install-SPSE_Fix.ps1 index 7ea5017..8cac377 100644 --- a/Install-SPSE_Fix.ps1 +++ b/Install-SPSE_Fix.ps1 @@ -61,6 +61,7 @@ try { } catch { Write-Host "❌ Error checking group membership: $($_.Exception.Message)" -ForegroundColor Red + Exit 1 } From 06e00d6ab9b92073a3248d7fd600b3d74eaa1367 Mon Sep 17 00:00:00 2001 From: Rob3r70 Date: Thu, 16 Apr 2026 16:26:30 +0200 Subject: [PATCH 3/3] Update Install-SPSE_Fix.ps1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Install-SPSE_Fix.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/Install-SPSE_Fix.ps1 b/Install-SPSE_Fix.ps1 index 8cac377..3a1edf5 100644 --- a/Install-SPSE_Fix.ps1 +++ b/Install-SPSE_Fix.ps1 @@ -53,7 +53,6 @@ try { if ($IsMember) { Write-Host "❌ SYSTEM is a member of '$GroupName'" -ForegroundColor Red break - break } else { Write-Host "✅ SYSTEM (S-1-5-18) is not a member of '$GroupName'" -ForegroundColor Green