Power shell Script to get PDC host name from client.

By | March 27, 2024

$domainController = ([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).DomainControllers[0].Name
Write-Host “Domain Controller Hostname: $domainController”

Leave a Reply

Your email address will not be published. Required fields are marked *