first, I usually find DHCP servers in our domain
Get-DhcpServerInDC
then, choose one - let's say "ourDHCPServer"
Get-DhcpServerv4Scope -ComputerName ourDHCPServer.ourDomain.com | foreach {Get-DhcpServerv4Lease -computername ourDHCPServer.ourDomain.com -allleases -ScopeId ($_.ScopeId)}
DHCP servers, list for this domain
Get-DhcpServerInDC
If this displays DHCP servers that are obviously obsolete, see remove old DHCP servers (not PowerShell)
- Start Adsiedit.msc
- Open the configuration Container
- Expand Services
- Expand Net Services
- On the right hand side you will find a record named CN=DHCPRoot
- Right Click the CN=DhcpRoot entry and then click Properties
- Highlight DhcpServers Attribute and click Edit
firewall ports - see ports, firewall
firewall, configure for domains and trusts
are ports 53, 135, 445 & 3268 enabled?
Get-NetFirewallPortFilter -PolicyStore ActiveStore `
| ? {($_.LocalPort -eq '53') -or ($_.LocalPort -eq '135')
-or
($_.LocalPort -eq '389')
-or
($_.LocalPort -eq '445')
-or
($_.LocalPort -eq '3268 ')} `
| Sort-Object LocalPort, Protocol | Format-Table -Property *
or more simply:
Get-NetFirewallPortFilter -PolicyStore ActiveStore `
| ? {($_.LocalPort -eq '53')
-or
($_.LocalPort -eq '135')
-or
($_.LocalPort -eq '389')
-or
($_.LocalPort -eq '445')
-or
($_.LocalPort -eq '3268')} `
| Sort-Object LocalPort, Protocol | Format-Table Protocol, LocalPort, InstanceID
But not sure this is the right approach. This seems more centered on services rather than ports...
MAC addresses associated with DHCP addresses - see DHCP addresses/MAC addresses
Get-NetTCPConnection -State Established
seems to sort descending by LocalPort
Get-NetFirewallPortFilter -PolicyStore ActiveStore | ? {$_.LocalPort -ne 'any'} | Sort-Object LocalPort, Protocol | Format-Table -Property *