Agregar script para ocultar botones del menú de inicio

This commit is contained in:
2025-08-07 14:09:04 -06:00
parent 6d6f907e89
commit fddb4943f9

30
Políticas/Apagado.ps1 Normal file
View File

@@ -0,0 +1,30 @@
# Ejecutar como Administrador
$basePath = "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\Start"
# Subclaves a ocultar (todas menos HideLock)
$toHide = @(
"HideChangeAccountSettings",
"HideHibernate",
"HidePeopleBar",
"HidePowerButton",
"HideRecentJumplists",
"HideRestart",
"HideShutDown",
"HideSignOut",
"HideSleep",
"HideSwitchAccount",
"HideTaskViewButton",
"HideUserTile"
)
foreach ($item in $toHide) {
$path = Join-Path $basePath $item
if (!(Test-Path $path)) {
New-Item -Path $path -Force | Out-Null
}
# Behavior = 1 → ocultar
New-ItemProperty -Path $path -Name "value" -Value 1 -PropertyType DWord -Force | Out-Null
Write-Host "Ocultado: $item"
}
Write-Host "✔ Todos los botones ocultos excepto 'Bloquear'. Reinicia para aplicar cambios."