Pull DHCP info using PowerShell

This short script will get all the DHCP servers authorized in your Windows domain, and pull all the scopes and IPs. It exports these to two separate CSV files. $DHCPServers = Get-DhcpServerInDC If (Test-Path -Path $env:TEMP\Scopes.csv) {Remove-Item $env:TEMP\Scopes.csv} If (Test-Path -Path $env:TEMP\Leases.csv) {Remove-Item $env:TEMP\Leases.csv} If (Test-Path -Path $env:TEMP\Leases.csv) {Remove-Item $env:TEMP\DNSExport.csv} foreach ($_ In $DHCPServers) {… Continue reading Pull DHCP info using PowerShell