Fixed bug with fqdn

Thanks to @curi0usJack for reporting this.
1.6
Matt Nelson 2016-08-06 23:10:01 -07:00 committed by GitHub
parent 3332f4aa98
commit 2523f84f0f
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ function Invoke-SMBAutoBrute
function Get-PDCe()
{
$context = new-object System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain","lab.com")
$context = new-object System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain",$env:UserDNSDomain)
$domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetDomain($context)
return $domain.pdcRoleOwner
}