# Check SYSVOL for GPP Shortcuts/Files XML and any scripts referencing our URLs
$sysvol = "\\cascades.local\SYSVOL\cascades.local\Policies"
Write-Output "=== GPP XML files ==="
Get-ChildItem $sysvol -Recurse -Include "Shortcuts.xml","Files.xml" -ErrorAction SilentlyContinue | ForEach-Object {
    Write-Output "  $($_.FullName)"
    Get-Content $_.FullName -Raw
}
Write-Output ""
Write-Output "=== Scripts referencing shortcuts ==="
Get-ChildItem $sysvol -Recurse -Include *.ps1,*.bat,*.cmd,*.vbs -ErrorAction SilentlyContinue | ForEach-Object {
    $c = Get-Content $_.FullName -Raw -ErrorAction SilentlyContinue
    if ($c -match 'alis|helpany|pharmcare|linkrx|\.url') {
        Write-Output "MATCH: $($_.FullName)"
        Write-Output $c
    }
}
