Link to home
Start Free TrialLog in
Avatar of Mike
MikeFlag for United States of America

asked on

Need Powershell script to scan for Mac address in list of DHCP Servers

Greeting Experts,

I need some help creating a script that can scan a list of DHCP servers for Mac address and come back with its IP address/DHCP Server is on.  Our ACtive Directory is large and going throw each DHCP server looking at the Mac address would take too much time. can somebody help me with this task. thank
Avatar of Jeremy Weisinger
Jeremy Weisinger

What version of Windows are the DHCP servers running?
Avatar of Mike

ASKER

we are running 2012 Server
ASKER CERTIFIED SOLUTION
Avatar of Jeremy Weisinger
Jeremy Weisinger

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike

ASKER

For some reason I get the following error below, I have Remote Active Directory tools and DHCP Tools both installed on my Windows 10 Device.



Get-ADObject : Directory object not found
At U:\PS\ServerList\ServerList.ps1:4 char:17
+ ... pservers = (Get-ADObject -SearchBase $searchbaase -Filter "objectclas ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Get-ADObject], ADIdentityNotFoundException
    + FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,Micros 
   oft.ActiveDirectory.Management.Commands.GetADObject

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Script has requested functionality.