Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
The Server Admin
The Server Admin
  • Home
  • Linux
  • Windows
  • About
  • What Powers The Server Admin
  • Home
  • Linux
  • Windows
  • About
  • What Powers The Server Admin
Close

Search

  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
Subscribe
Windows

Set DNS from PowerShell

By Anthony
March 24, 2024 2 Min Read
0

It’s always DNS even with it is not. Right? So often at least I have found out many problems with internet connections is DNS. We work with at very powerful tool called Kasaya that we have on all of our clients pc’s which allow us a backdoor into the system as long as the computer itself is online. Now this is a very interesting piece of software that it has a backdoor powershell access. So super cool, but this allows us to do some quick and powerful administration when you can’t get the user to do things, or don’t want to have to wait for the user, or somethings that require elevated access. So powershell is that answer!

DNS, yes again its always DNS, so many times we see a client that says “I can’t connect to the internet” and you know the rest. Well if we can connect to that pc, then we know its online, so DNS right? How do we check this?

ipconfig /all

What we “normally” will see is under the DNS Servers section, it will either be something like 127.0.0.1 or something odd. Which means well you can’t look up DNS queries so well no internet. So how do we fix this?

We do it with two commands! First we need to find our connected interface.

netsh interface ipv4 show config

So in my above example, the interface I am looking for is Ethernet. You may have more or they might be named differently but look for the one with the IP Address, Subnet, Gateway and such filled.

Ok so I have the interface, so now how to do I change it?

netsh interface ipv4 set dns name="Ethernet" static 8.8.8.8

You will see nothing, now how do I check this?

netsh interface ipv4 show config

Now you can see the DNS is set to Google’s. So now ping google.com and all should be working.

Author

Anthony

Follow Me
Other Articles
Previous

Physical Disk Information

Next

Show all Mount Points – Powershell

No Comment! Be the first one.

Leave a Reply

You must be logged in to post a comment.

Search

Need a Virtual Server for sysctl testing? Check out our plans!

Popular Posts

  • Mount sFTP folder as local drive
    by Anthony
    June 9, 2026
  • Robocopy Examples
    by Anthony
    February 12, 2026
  • Rsync Command Examples
    by Anthony
    February 10, 2026

Trending

  • Mount sFTP folder as local drive
    by Anthony
    June 9, 2026
  • Adding a GUI to a Server or VPS
    by Anthony
    August 27, 2024
  • Back up to a shared folder with Time Machine on Mac
    by Anthony
    January 4, 2025
  • Backup Your Databases
    by Anthony
    March 24, 2024

Editors Picks

    Send an email:
    mail@example.com

    Call me:
    123-456-7890

    • Facebook
    • Twitter
    • Instagram
    • TikTok
    • LinkedIn
    • Behance
    Copyright 2026 — The Server Admin. All rights reserved. Blogsy WordPress Theme