DHCP Scope içinde Bad Address Temizleme

DHCP IP çakışması sonucu scope içinde bad adress olarak görünen 1 veya daha çok adres işaretlenmiş olabilir. Bunları temizlemek için scope ID yazmamız yeterlidir. Bu adresleri powershell ile temizleyebiliriz.

Get-DhcpServerv4Scope -ComputerName "dhcpservername.kurt.local"   -   scopeID'ler ile birllikte tüm her şeyi listeliyor.
Get-DhcpServerv4Scope -ComputerName -"dhcpservername.kurt.local" -ScopeId 10.x.x.0 - 10.x.x.0 ScopoID'si yazıldığında sadece bu scope'a ait bilgileri listeler.
Get-DhcpServerv4Scope -ScopeId 10.x.x.0 | Get-DhcpServerv4Lease -BadLeases | Remove-DhcpServerv4Lease  - Belirtilen ScopeID içindeki Bad_Adress olarak işaretlenen tüm IP adreslerini siler.
Bu powershell çalıştırıldığında bütün scoplar sorgulanıyor ve otomatik olarak temizleniyor.
 foreach ($Scopelar in (Get-DhcpServerv4Scope -ComputerName "dhcpserver.kurt.local" | select ScopeId).ScopeId)
  { Get-DhcpServerv4Scope -ScopeId $Scopelar | Get-DhcpServerv4Lease -BadLeases | Remove-DhcpServerv4Lease }