Windows 2012 R2 DHCP Script to Search all Scopes for Clients with a Specific naming context

We have a very large DHCP server environment with 320 scopes. Using powershell is there someway to search each scope recursively and list all workstation that match a specific naming context and their current IP address?
LVL 20
compdigit44Asked:
Who is Participating?
 
oBdAConnect With a Mentor Commented:
How about
Get-DhcpServerv4Scope | Get-DhcpServerv4Lease | Where-Object {$_.HostName -like '*Whatever*'}

Open in new window

0
 
compdigit44Author Commented:
Worked perfectly!!!!

Genius....
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.