How to grab list of DHCP scope, reservation and start & end ip configured for each scope details into excel or notepad in windows 2008

How to grab list of DHCP scope, reservation details into excel or notepad in windows 2008
Doodad BoySupprtAsked:
Who is Participating?
 
Sam Simon NasserConnect With a Mentor IT Support ProfessionalCommented:
do it using powershell
Get-DHCPServerV4Scope | ForEach ($ScopeID) {Get-DHCPServerv4Lease -ScopeID $_.ScopeID}|where {$_.AddressState -like "*Reservation"} | Format-Table -Property ScopeId,IPAddress,HostName,ClientID,AddressState -Autosize > c:\$env:computername-Reservations.txt

Open in new window


or

Get-DHCPServerV4Scope | ForEach {

    Get-DHCPServerv4Lease -ScopeID $_.ScopeID | where {$_.AddressState -like '*Reservation'}

} | Select-Object ScopeId,IPAddress,HostName,ClientID,AddressState | Export-Csv ".\$($env:COMPUTERNAME)-Reservations.csv" -NoTypeInformation

Open in new window

0
 
Sam Simon NasserIT Support ProfessionalCommented:
no feedback, assumes works.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.