Anyone know how to query a specific value with a AD LDS & AD sync when using Full Proxy user?
According to the following article, you need to login before you can proxy.
.
https://technet.microsoft.com/en-us/library/2008.12.proxy.aspx
.
Now when I translate this to powershell, first part is working (login), but the second part, searching is not.
It returns the object is not on the server, bad enumeration.
.
$CurrentDomain = "LDAP://ADLDS"
$root = New-Object System.DirectoryServices.DirectoryEntry($CurrentDomain,$UserName,$Password)
$searcher = New-Object System.DirectoryServices.DirectorySearcher($root)$searcher.Filter = "CN=$UserName"
$adfind = $searcher.FindAll()
$adfind[0].Path.UserAccountControl