Advertisement
ineitzke

PowerShell DNS

Dec 14th, 2016
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. Kommando-Beispiele. "[...]" und "888..." sind variabel und vom jeweils verwendeten System abhängig.
  2. Die " sind nur dann zwingend nötig, wenn der Name Leerzeichen (Blanks) enthält.
  3. First, the network name is likely "Ethernet", not "Local Area Connection". To find out the name you can do this:
  4. PS> netsh int show interface
  5. PS> netsh interface ipv4 show dnsserver "LAN-Verbindung"
  6. Now you can change the primary dns (index=1), assuming that your interface is static (not using dhcp):
  7. PS> netsh interface ipv4 add dnsserver "Ethernet" address=888.888.x.x index=1
  8. To change DNS to automatic via command, type the following:
  9. PS> netsh interface ip set dns "Local Area Connection" dhcp
  10.  
  11. PS> Start-Process powershell -Verb runAs
  12. PS> netsh interface ipv4 set dnsservers name="LAN-Verbindung" static 888.888.888.888 primary
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement