Using PowerShell to Retrieve DCs within a Specific Domain

The following example will use a remote PowerShell session to query a list of domain controllers under a domain name, and return the first result. Note: This does not verify that the domain controller is online and responding to queries! /// <summary> /// Returns a domain controller from the specified…