Last active
May 25, 2022 19:44
-
-
Save MWRobertson/5a2bd201c336f7ac4615e216fcde80ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-SiteCodeCoverage { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$TRUE)][ValidateNotNullOrEmpty()][String]$SiteCode, | |
[Parameter(Mandatory=$TRUE)][ValidateNotNullOrEmpty()][String]$ZoneName = $env:USERDNSDOMAIN, | |
[Parameter(Mandatory=$TRUE)][ValidateNotNullOrEmpty()][String]$DNSServer | |
) | |
Get-DnsServerResourceRecord -ZoneName $ZoneName -ComputerName $DNSServer -RRType Srv |` | |
? {$_.HostName -eq "_kerberos.tcp.$SiteCode._sites.dc._msdcs" -or` | |
$_.HostName -eq "_ldap._tcp.$SiteCode._sites.dc._msdcs"} |` | |
Select HostName, RecordType -ExpandProperty RecordData | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment