Hi,
Prewritten scripts can be found in the repository here:
http://gallery.technet.microsoft.com/scriptcenter
If you don't find what you're after and you can't write your own, you can request a script here:
https://gallery.technet.microsoft.com/scriptcenter/site/requests
Use NETSH to manage DHCP: https://technet.microsoft.com/en-us/library/cc787375(v=ws.10).aspx
Hi Triyambak,
If you are running Server 2012 and newer, please check the cmdlet Add-DhcpServerv4ExclusionRange in DHCP Module.
DHCP Server Cmdlets in Windows PowerShell
You can also refer to these functions to add and remove the exclusion range to a DHCP scope on the old Windows Server version.
Remove-DHCPExclusionRange
Add-DHCPExclusionRange
Refer to:
If there is anything else regarding this issue, please feel free to post back.
If you have any feedback on our support, please click here.
Best Regards,
Anna Wang
TechNet Community Support