Write-Output "=== Recent GP events mentioning Preferences/Shortcut/CSE ==="
Get-WinEvent -LogName "Microsoft-Windows-GroupPolicy/Operational" -MaxEvents 100 -ErrorAction SilentlyContinue | Where-Object { $_.Message -match 'Shortcut|Preference|Extension|loopback|Nurse|Kiosk' } | Select-Object -First 20 | ForEach-Object { Write-Output "$($_.TimeCreated) [id=$($_.Id) lvl=$($_.Level)] $($_.Message.Substring(0,[Math]::Min(300,$_.Message.Length)))"; Write-Output "---" }
Write-Output ""
Write-Output "=== Verify Shortcuts.xml in kiosk GPO SYSVOL ==="
$kioskGuid = (Get-GPO -Name 'CSC - Nurse Station Kiosk').Id
$xmlPath = "\\cascades.local\SYSVOL\cascades.local\Policies\{$kioskGuid}\User\Preferences\Shortcuts\Shortcuts.xml"
if (Test-Path $xmlPath) {
    Write-Output "EXISTS: $xmlPath"
    Get-Content $xmlPath -Raw | Write-Output
} else { Write-Output "MISSING: $xmlPath" }
