-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwin2008_preset_machine.ps1
27 lines (21 loc) · 1.13 KB
/
win2008_preset_machine.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# código adaptado para windows server 2008
# ComputerName
$ComputerName = "sapsrv"
Rename-Computer -NewName $ComputerName -Force
# Mostrar extensiones de archivo
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "HideFileExt" -Value 0
# Mostrar ocultos y archivos del sistema
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowSuperHidden" -Value 1
# Memoria Virtual (swap)
$PageFileSizeMB = 20500
# Desactivar asignación automática
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "PagingFiles" -Value "C:\pagefile.sys $($PageFileSizeMB) $($PageFileSizeMB) 0 0"
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "DisablePagingExecutive" -Value 1
# Desactivar UAC
# Ultimo paso previo a instalar EHP6
$regPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
$regName = "EnableLUA"
$regValue = 0
Set-ItemProperty -Path $regPath -Name $regName -Value $regValue
# Reiniciar para aplicar cambios
Restart-Computer -Force