diff --git a/Políticas/Apagado.ps1 b/Políticas/Apagado.ps1 new file mode 100644 index 0000000..f9b1dba --- /dev/null +++ b/Políticas/Apagado.ps1 @@ -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."