Solved

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

Posted on 2016-11-03
2
44 Views
Last Modified: 2016-11-04
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?
0
Comment
Question by:compdigit44
2 Comments
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 41873483
How about
Get-DhcpServerv4Scope | Get-DhcpServerv4Lease | Where-Object {$_.HostName -like '*Whatever*'}

Open in new window

0
 
LVL 19

Author Comment

by:compdigit44
ID: 41874494
Worked perfectly!!!!

Genius....
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now