-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpreset_all.ps1
31 lines (24 loc) · 1.41 KB
/
preset_all.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
28
29
30
31
# ComputerName
$ComputerName = "sapsrv"
Rename-Computer -NewName $ComputerName -Force
# Memoria Virtual (swap)
$PageFileSizeMB = 20500
# 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
# 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
# abrir puerto TCP3200 para permitir conexiones al servidor (sapgui)
# en virtualbox configurar port-forwarding
New-NetFirewallRule -DisplayName "SAP Inbound" -Direction Inbound -LocalPort 3200 -Protocol TCP -Action Allow
New-NetFirewallRule -DisplayName "SAP Outbound" -Direction Outbound -LocalPort 3200 -Protocol TCP -Action Allow
# 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