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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -