J.R. Sitman
asked on
How do you change the subnet mask for the entire domain?
I need to change our subnet mask from 255.255.255.0 to 255.255.0.0. I know for all the static equipment I have to do it manually, so my question is how do I do it so it gets applied to the entire domain.
What are you using for a DHCP server? You would make the change there.
In newer Windows servers, you will find it under the General Properties of the Scope in the DHCP manager. You will likely have to delete and recreate the scope to change the netmask.
Once a scope is created then you can't change the subnet mask - you have to delete the scope and recreate it with the new mask
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SetStaticIP.ps1
$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'"
$wmi.EnableStatic($wmi.IPAddress[0], "255.255.0.0")
$wmi.SetGateways("$wmi.DefaultIPGateway, 1)
ASKER
Ok I under stand what needs to be done.
@clonyxlro please clarify "It also require you to change all subnet host and gateway.
@clonyxlro please clarify "It also require you to change all subnet host and gateway.
ASKER
while creating the new scope I got the attached error. Should I deactivate the existing scope first?
dhcp.png
dhcp.png
ASKER
Should I also change the subnet mask of the DHCP server first?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Your new scope overlaps the old one, so delete the old scope first.
ASKER
Thanks to all. It worked