Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Install-SPSE_Fix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
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
Comment on lines +54 to +62

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All other Write-Host status messages in this script appear to be plain ASCII text; introducing emoji characters here may cause garbled output in some consoles/log pipelines and makes output harder to grep/parse consistently. Consider using a text prefix (e.g., "ERROR:" / "OK:") instead of emojis.

Suggested change
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
Write-Host "ERROR: SYSTEM is a member of '$GroupName'" -ForegroundColor Red
break
break
}
else {
Write-Host "OK: SYSTEM (S-1-5-18) is not a member of '$GroupName'" -ForegroundColor Green
}
}
catch {
Write-Host "ERROR: Error checking group membership: $($_.Exception.Message)" -ForegroundColor Red

Copilot uses AI. Check for mistakes.
Comment thread
Rob3r70 marked this conversation as resolved.
Exit 1
}





# allow relative paths to work
$CULocation = [System.IO.Path]::GetFullPath([System.IO.Path]::Combine($PWD, $CULocation))

Expand Down