Commit 2ea67b73 by César Galvis

feat: updated windows settings script with FQDN setup

parent 5a42da4a
......@@ -30,4 +30,24 @@ Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\P
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" -Name "SystemUsesLightTheme" -Value 0
## Restart explorer.exe
Stop-Process -Name explorer -Force
Start-Process explorer.exe
\ No newline at end of file
Start-Process explorer.exe
# Configure FQDN domain
Write-Host "Configure FQDN domain..."
$hostsPath = "$env:SystemRoot\System32\drivers\etc\hosts"
$fqdn = "windows-vpn.local"
$ip = "127.0.0.1"
$entry = "$ip`t$fqdn"
## Check if the entry already exists
$hostsContent = Get-Content $hostsPath
if ($hostsContent -notcontains $entry) {
Add-Content -Path $hostsPath -Value $entry
Write-Host "Added: $entry"
} else {
Write-Host "The entry already exists"
}
# Restart computer
Write-Host "Restarting computer..."
Restart-Computer
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment