Export clients from DHCP via Powershell

We will export all the clients from your DHCP server. Please get your all scopes and export to txt file first

 

$PCS= Get-Content C:\files\ALL_scopes.txt
foreach ($pc in $PCS)
{
netsh dhcp server YOURDHCP scope $pc show clients 1  >> c:\files\dhcpreport.txt }

}