Monday, December 13, 2021

Updating DNS servers via command line

Problem: Updating DNS to a static address on a subset of users.
No VLANs
No network segmentation
Basically, can't be done via DHCP due to hardware and previous configuration limitations.

Using CMD, the DNS servers can be changed from DHCP to Static, if you have a remote tool (LogMeIn, Splashtop, etc) that can connect to the computers and run CMD line instructions, this could help. WMIC node: or powershell may allow you to run the same if your environment is compatible.

Find the name of the interface:

netsh interface ipv4 show config

Also, ipconfig/all will work

Update DNS to static:

netsh interface ipv4 set dns name="(InterfaceName)" static 1.1.1.1

Add second DNS server:

netsh interface ipv4 add dnsserver "(InterfaceName)" address=8.8.8.8

No comments:

Post a Comment

ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'

 I tried a couple things, downgrading, reinstalling, followed some github links talking about /usr/local/lib/python3.10/dist-packages/basics...