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
This commit is contained in:
19
clients/cascades-tucson/scripts/fix-cmd-popup.ps1
Normal file
19
clients/cascades-tucson/scripts/fix-cmd-popup.ps1
Normal file
@@ -0,0 +1,19 @@
|
||||
Import-Module GroupPolicy
|
||||
$guid = '32d76052-4d92-446c-95fb-614653f84742'
|
||||
# Remove the logon script (causing CMD popup) - GPP shortcuts work now
|
||||
$scriptsDir = "\\cascades.local\SYSVOL\cascades.local\Policies\{$guid}\User\Scripts"
|
||||
if (Test-Path $scriptsDir) { Remove-Item $scriptsDir -Recurse -Force; Write-Output "Removed Scripts dir" }
|
||||
# Remove the script registry entries from kiosk GPO
|
||||
$base = 'HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Logon\0'
|
||||
Remove-GPRegistryValue -Guid $guid -Key "$base\0" -ValueName 'Script' -ErrorAction SilentlyContinue
|
||||
Remove-GPRegistryValue -Guid $guid -Key "$base\0" -ValueName 'Parameters' -ErrorAction SilentlyContinue
|
||||
Remove-GPRegistryValue -Guid $guid -Key "$base\0" -ValueName 'IsPowershell' -ErrorAction SilentlyContinue
|
||||
Remove-GPRegistryValue -Guid $guid -Key "$base" -ValueName 'GPO-ID' -ErrorAction SilentlyContinue
|
||||
Remove-GPRegistryValue -Guid $guid -Key "$base" -ValueName 'SOM-ID' -ErrorAction SilentlyContinue
|
||||
Remove-GPRegistryValue -Guid $guid -Key "$base" -ValueName 'FileSysPath' -ErrorAction SilentlyContinue
|
||||
Remove-GPRegistryValue -Guid $guid -Key "$base" -ValueName 'DisplayName' -ErrorAction SilentlyContinue
|
||||
Remove-GPRegistryValue -Guid $guid -Key "$base" -ValueName 'GPOName' -ErrorAction SilentlyContinue
|
||||
Write-Output "Removed logon script GPO entries"
|
||||
# Block Microsoft Store for caregivers
|
||||
Set-GPRegistryValue -Guid $guid -Key 'HKCU\Software\Policies\Microsoft\WindowsStore' -ValueName 'RemoveWindowsStore' -Type DWord -Value 1 | Out-Null
|
||||
Write-Output "Microsoft Store blocked"
|
||||
Reference in New Issue
Block a user