active directory - Using different methods of System.DirectoryServices.ActiveDirectory.Domain -
the static method of getcurrentdomain() works without issue but, when try use method such finddomaincontroller(), receive methodnotfound exception error.
use domain.finddomaincontroller method find dc in domain:
[system.directoryservices.activedirectory.domain]::getcomputerdomain().domaincontrollers [system.directoryservices.activedirectory.domain] doesn't have finddomaincontroller() method.
or use domain.finddomaincontroller method
[system.directoryservices.activedirectory.domain]::getcurrentdomain().finddomaincontroller() this 1 finds domain controller in domain. there no guarantee same domain controller found call method.
Comments
Post a Comment