I can specify the domain controller when I want to search through AD using this:
$principalContext = New-Object 'System.DirectoryServices.AccountManagement.PrincipalContext'([System.DirectoryServices.AccountManagement.ContextType]::Domain, $DomainControllerIpAddress, $Container)
How can I specify the domain controller using a DirectoryEntry
or DirectorySearcher
?