Categories
Welcome Center
Education & Development
Discussions
Certification Preparation
Recent Posts
Groups
Free Resources
Ebooks
Free Workshops
Trending Certifications Infographic
Infosec Training
IT & Security Training
Live Boot Camps
Security Awareness Training
About Infosec Institute
Home
Certification Preparation
Other/General Certifications
Powershell LDAP query
mikedisd2
I need to run an LDAP query on DC in another AD domain. I'm trying the following:
$cred = Get-Credential
$domain = [ADSI]"LDAP://DC01/ou=domain users,dc=company,dc=org"
$root = new-object system.directoryservices.directorysearcher $domain, $cred
$user = $root.findall()
$user
There's a heap of variations on the web and, for me they all return the same error:
Exception calling "FindAll" with "0" argument(s): "The server is not operational".
It may have to do with permissions; this script works fine on the local AD. Can't find out why the FindAll never works.
Find more posts tagged with
Save $250 on 2025 certification boot camps from Infosec!
Book now with code EOY2025
Button
Comments
There are no comments yet
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
INFOSEC Boot Camps
$250
OFF
Use code
EOY2025
to receive $250 off your 2025 certification boot camp!
BROWSE BOOT CAMPS