Closed ERAustin closed 4 years ago
The usage is:
$Domain = 'YOURDOMAIN'
$PSWinDocumentationDNS = Import-Module PSWinDocumentation.DNS -PassThru
& $PSWinDocumentationDNS {
param($Domain)
$Forwarders = Get-WinDnsServerForwarder -Domain $Domain -WarningAction SilentlyContinue
Compare-MultipleObjects -Objects $Forwarders -FormatOutput -CompareSorted:$true -ExcludeProperty GatheredFrom -SkipProperties -Property 'IpAddress' #| Out-HtmlView -ScrollX -DisablePaging -Filtering
} $Domain
Try this. Since that command is not public it doesn't work without all the added code as above. Let me know what is the result.
In testing I did add the domain with no success. Output from your code above is below:
Get-ADDomainController : Directory object not found At C:\Program Files\WindowsPowerShell\Modules\PSWinDocumentation.DNS\0.0.8\PSWinDocumentation.DNS.psm1:165 char:61
+ CategoryInfo : ObjectNotFound: (:) [Get-ADDomainController], ADIdentityNotFoundException
+ FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,Microsoft.ActiveDirectory.Management.Commands.GetADDomainController
Did you change YourDomain to your domain name?
Get-ADDomainController -Filter * -Server 'yourdomainworks'
Get-ADDomainController -Filter * -Server $ENV:USERDNSDOMAIN
does either of those works?
Yes, I did change the domain name. For some reason, both of those commands you asked about result in "Directory Object not found"
Interestingly enough, if I simply query "Get-ADDomainController" that returns my PDC.
However if I qualify that with "-Filter *" or anything else then I get "Directory Object not found"
That's weird. Get-ADDomainController -Filter * delivers all DC's within a domain. Make sure you have updated PS to 5.1 version and maybe up to date RSAT?
Make sure it's 5.1.
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.18362.145
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
I will look into updating RSAT. PSVersion looks good.
Y:> $psversiontable
Name Value
PSVersion 5.1.14393.3053
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3053
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
I uninstalled all the AD DS and AD LDS Tools from Programs and Features, rebooted, then reinstalled them. The issue still remains.
Well, it's not really a problem with testimo since it's about Get-ADDomainController -Filter *
not delivering results at all. That command is pretty basic and critical for Testimo operations. Do other tests work fine?
Yes, all of the other tests are great. Since this appears to be a local issue and not related to Testimo then we can likely close this issue. I thank you for your help.
Just so you know, it's extremely weird that command doesn't work. Maybe your domain is broken or something and that causes a problem with that command. Try running it on DC's or different machines or maybe review event logs.
Just to follow up, I've corrected this issue. The reason for this was that there were some RIverbed devices that were showing up in Sites and Services. They should not have been there and were presenting as RoDCs and causing the lookup to fail. After deleting them, the query worked as expected.
Great! Thank you for your follow up!
All DNS tests fail with no data provided. Reinstallation of PSWinDocumentation.DNS doesn't help. Seems like some cmdlets are not loaded - for example "Get-WinDnsServerForwarder" is not a recognized cmdlet. Tried on multiple servers and domain controllers