dotfiles/PS/bootstrap.ps1

15 lines
622 B
PowerShell

#Powershell based windows 10 bootstrap script
# First we source in our powershell profile so we can have some useful utilities
. "./PowerShellProfile.ps1"
# First step is to overwrite our current profile with a symlink to the correct one.
Remove-Item -Force -Path $profile
New-Item -ItemType SymbolicLink -Target "./PowerShellProfile.ps1" -Path $profile
# Now ensure our dnsservers are properly set up
Invoke-Elevated {
Get-NetAdapter | ForEach-Object {
Set-DnsClientServerAddress -InterfaceIndex $_.ifIndex -ServerAddresses 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, 2606:4700:4700::1001
}
}