Agregar script para ocultar botones del menú de inicio
This commit is contained in:
30
Políticas/Apagado.ps1
Normal file
30
Políticas/Apagado.ps1
Normal 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."
|
||||
Reference in New Issue
Block a user