Files
claudetools/clients/cascades-tucson/scripts/setup-logon-1.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

14 lines
1.3 KiB
PowerShell

$guid = '32d76052-4d92-446c-95fb-614653f84742'
# Write logon script
$bat = "@echo off`r`nif not exist `"%USERPROFILE%\Desktop\ALIS.url`" (`r`n echo [InternetShortcut]> `"%USERPROFILE%\Desktop\ALIS.url`"`r`n echo URL=https://cascadestucson.alisonline.com/>> `"%USERPROFILE%\Desktop\ALIS.url`"`r`n)`r`nif not exist `"%USERPROFILE%\Desktop\PharmCare.url`" (`r`n echo [InternetShortcut]> `"%USERPROFILE%\Desktop\PharmCare.url`"`r`n echo URL=https://pharmcare.linkrxnow.com/>> `"%USERPROFILE%\Desktop\PharmCare.url`"`r`n)`r`nif not exist `"%USERPROFILE%\Desktop\Helpany.url`" (`r`n echo [InternetShortcut]> `"%USERPROFILE%\Desktop\Helpany.url`"`r`n echo URL=https://app.helpany.com/start>> `"%USERPROFILE%\Desktop\Helpany.url`"`r`n)"
$gpoScripts = "\\cascades.local\SYSVOL\cascades.local\Policies\{$guid}\User\Scripts\Logon"
New-Item -ItemType Directory -Path $gpoScripts -Force | Out-Null
Set-Content "$gpoScripts\deploy-caregiver-shortcuts.bat" $bat -Force
$ini = "[Logon]`r`n0CmdLine=deploy-caregiver-shortcuts.bat`r`n0Parameters=`r`n"
Set-Content "$gpoScripts\scripts.ini" $ini -Force
# Remove broken GPP
$xmlDir = "\\cascades.local\SYSVOL\cascades.local\Policies\{$guid}\User\Preferences"
if (Test-Path $xmlDir) { Remove-Item $xmlDir -Recurse -Force }
Write-Output "Logon script + scripts.ini written, GPP removed"
Get-Content "$gpoScripts\deploy-caregiver-shortcuts.bat"