ADSI with Powershell

Kushal Goswami 21 Reputation points
2021-07-12T09:42:42.02+00:00

Hello, I have been trying to do ADSI binding with Powershell on domain joined PC with local account login, and passing the domain credentials it is just failing with

"Exception occurred while retriving member "distinguishedName" : The specified domain is either does not exists or could not be contacted"

Its does work, all good, when I do this with AD account login and passing other AD credentials.

Machine is connected to LAB and domain is pinging, no issues there.

Please can someone help, how do I achieve this.

Thank you for the help.

Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

2 answers

Sort by: Most helpful
  1. Evgenij Smirnov 541 Reputation points
    2021-07-12T15:06:24.517+00:00

    How about you post some code so we can help you figure out where it doesn't work as intended?

    Was this answer helpful?


  2. Rich Matheisen 48,201 Reputation points
    2021-07-12T14:46:10.213+00:00

    Which groups have permission to read data from the AD?

    Since you're using non-domain credentials you'd probably have to allow Guest access. "Authenticated users" can read data from the AD. "Everyone" includes "Guest" (and "Guest" is disabled by default) and "Authenticated Users". "Anonymous" logins are excluded from "Everyone".

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.