Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2016-11-03
2
Medium Priority
?
117 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 85

Accepted Solution

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

Open in new window

0
 
LVL 20

Author Comment

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

Genius....
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
Loops Section Overview

885 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