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
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 it from this GitHub Repository:
I home this can be useful to others as well