Files
claudetools/clients/cascades-tucson/scripts/clear-prt-cache.ps1
Howard Enos 8d2ca14cac sync: auto-sync from HOWARD-HOME at 2026-07-17 14:14:41
Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-07-17 14:14:41
2026-07-17 14:15:20 -07:00

21 lines
997 B
PowerShell

Write-Output "=== Clearing stale token broker cache ==="
$aadBroker = Get-ChildItem "C:\Users\*\AppData\Local\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy" -Directory -ErrorAction SilentlyContinue
foreach ($p in $aadBroker) {
$ac = Join-Path $p.FullName "AC\TokenBroker"
if (Test-Path $ac) {
Remove-Item "$ac\*" -Recurse -Force -ErrorAction SilentlyContinue
Write-Output "Cleared: $ac"
}
}
$msAccount = Get-ChildItem "C:\Users\*\AppData\Local\Packages\Microsoft.Windows.CloudExperienceHost_cw5n1h2txyewy" -Directory -ErrorAction SilentlyContinue
foreach ($p in $msAccount) {
$ac = Join-Path $p.FullName "AC\TokenBroker"
if (Test-Path $ac) {
Remove-Item "$ac\*" -Recurse -Force -ErrorAction SilentlyContinue
Write-Output "Cleared: $ac"
}
}
Write-Output ""
Write-Output "Cache cleared. Reboot the machine, then log in as cascades\pilot.test."
Write-Output "The fresh login should acquire a PRT and Edge will SSO into ALIS automatically."