Why the script
If you regularly manages DHCP servers with PowerShell you might find it irritating that almost all cmdlets in the DHCP Server PowerShell Module (DHCPServer) require the input of a ScopeID (or Subnet ID) when all you realy have is the IP-address.
The solution is often to manualy look at the scopes in the server, but that is time-consuming and boring. So therefor I made this script that let you easily just type in a IP-address and find it’s associated ScopeID. And if you want, also more details with the -Details
parameter
How to use it
If you want to find the ScopeID for 10.174.9.9 just type in Find-DhcpServerv4ScopeID -IPaddress 10.174.9.9
after the module is imported.
Want more details?Find-DhcpServerv4ScopeID -IPaddress 10.174.9.9 -Details
.
PS: The DHCP Server PowerShell Module (DHCPServer) module must also be installed
Download
Download it from this GitHub Repository:
https://github.com/flemmingss/Find-DhcpServerv4ScopeID
Screenshots
I home this can be useful to others as well