Came across a unique request to get primary, secondary, and tertiary DNS values for multiple computers/servers across the domain. I started writing the script and got what I wanted. Now this started off as just to query for DNS Server information, but then I thought to add other pieces to get myself a good Network…
Tag: DHCP
Convert a Dynamic IP to Static
Working on a project where on some servers the DHCP assigned addresses needs to be converted to static. Since there is always more than one…I needed to script it. Here is a quick way to do it via PowerShell. Hope this helps!
Quick and Simple Way to Export DHCP Scope Settings From One Server to Another
Applies to: Windows Server 2008 R2, Windows Server 2012R2, Windows Server 2016 From the command prompt on the source DHCP server run the following command:
1 |
netsh dhcp server export c:\dhcp.dat all |
2. Copy the “dhcp.dat†file to the new, or destination, DHCP server and run the following command:
1 |
netsh dhcp server import c:\dhcp.dat all |
While running the export command, the DHCP service will be temporarily…