API Reference
CmdletTestDnsBlacklist
Queries DNSBL providers to see if domains or IPs are listed.
Inheritance
- ExportableAsyncPSCmdlet
- CmdletTestDnsBlacklist
Remarks
Default behavior: - Domain inputs: queries domain blocklists and then resolves MX A/AAAA to query IP blocklists for each resulting IP. - IP inputs: queries IP blocklists directly. - Mixed arrays: aggregates both without clearing prior results. Overrides: - -TreatAsDomain: forces the "domain + MX-IP" path for the input(s). - -TreatAsIp: if an input is an IP it is checked as-is; if an input is a domain, its apex A/AAAA IPs are resolved and checked on IP blocklists. Fallback: - When MX exists but has no resolvable A/AAAA (or no MX is present), the cmdlet falls back to apex A/AAAA for IP blocklist checks. Output: - By default returns a summary view across the domain and any resolved IPs. - With -FullResponse returns a dictionary mapping each key (domain or IP) to a DNSQueryResult. - Use -BlacklistedOnly to filter output to listed results. Performance: - Use -MaxConcurrency to hint the DNS resolver concurrency (requires DnsClientX 1.0.1+). Domain IP scan control: - Use -DomainIpScan to control which IPs are resolved and checked when a domain is provided. Values: MxOnly, MxAOnly, MxAAAAOnly, ApexOnly, ApexAOnly, ApexAAAAOnly, MxAndApex, MxThenApexFallback (default). Notes: - Word and HTML composition exports are supported. - Other export formats continue to use the shared "not implemented" warning path.
Examples
Default: domain + MX-IP checks.
Test-DDDnsBlacklist -NameOrIpAddress 'example.com' -Verbose
Force domain path explicitly (same as default for domains).
Test-DDDnsBlacklist -NameOrIpAddress 'example.com' -TreatAsDomain -Verbose
Treat a domain as IP-only checks (apex A/AAAA).
Test-DDDnsBlacklist -NameOrIpAddress 'example.com' -TreatAsIp -Verbose
Mixed inputs: domain + IP, return only listed hits.
Test-DDDnsBlacklist -NameOrIpAddress 'example.com','203.0.113.10' -BlacklistedOnly
Return the full mapping (domain and each IP as separate keys).
$res = Test-DDDnsBlacklist -NameOrIpAddress 'example.com' -FullResponse; $res['example.com']
Increase resolver concurrency (requires DnsClientX 1.0.1+).
Test-DDDnsBlacklist -NameOrIpAddress 'example.com' -MaxConcurrency 64 -Verbose
Constructors
public CmdletTestDnsBlacklist() #Methods
Inherited Methods
public PathInfo CurrentProviderLocation(String providerId) #PathInfoParameters
- providerId String
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
public Collection<String> GetResolvedProviderPathFromPSPath(String path, out ProviderInfo provider) #Collection<String>Parameters
- path String
- provider ProviderInfo
public override String GetResourceString(String baseName, String resourceId) #StringParameters
- baseName String
- resourceId String
public String GetUnresolvedProviderPathFromPSPath(String path) #StringParameters
- path String
public Object GetVariableValue(String name, Object defaultValue) #ObjectParameters
- name String
public Boolean ShouldContinue(String query, String caption) #BooleanParameters
- query String
- caption String
- hasSecurityImpact Boolean
- yesToAll Boolean
- noToAll Boolean
public Boolean ShouldProcess(String verboseDescription, String verboseWarning, String caption) #BooleanParameters
- verboseDescription String
- verboseWarning String
- caption String
- shouldProcessReason ShouldProcessReason
public Void ThrowTerminatingError(ErrorRecord errorRecord) #VoidParameters
- errorRecord ErrorRecord
public Void WriteCommandDetail(String text) #VoidParameters
- text String
public Void WriteError(ErrorRecord errorRecord) #VoidParameters
- errorRecord ErrorRecord
public Void WriteInformation(InformationRecord informationRecord) #VoidParameters
- informationRecord InformationRecord
public Void WriteObject(Object sendToPipeline) #VoidParameters
- sendToPipeline Object
public Void WriteProgress(ProgressRecord progressRecord) #VoidParameters
- progressRecord ProgressRecord
Properties
public SwitchParameter BlacklistedOnly { get; set; } #Parameter(Mandatory = false, ParameterSetName = "ServerName")public SwitchParameter TreatAsDomain { get; set; } #Parameter(Mandatory = false, ParameterSetName = "ServerName")public SwitchParameter TreatAsIp { get; set; } #Parameter(Mandatory = false, ParameterSetName = "ServerName")public Nullable<Int32> MaxConcurrency { get; set; } #Parameter(Mandatory = false, ParameterSetName = "ServerName")public Nullable<DomainIpScanMode> DomainIpScan { get; set; } #Parameter(Mandatory = false, ParameterSetName = "ServerName")Inherited Properties
public ReportFormat[] ExportFormat { get; set; } #Parameter(Mandatory = false) Alias(["Report"]) ValidateSet(["Html", "Json", "Word", "Excel", "Markdown", "MarkdownHtml"], IgnoreCase = true)public String ExportPath { get; set; } #Parameter(Mandatory = false)public SwitchParameter OpenInBrowser { get; set; } #Parameter(Mandatory = false) Alias(["OpenReport"])public SwitchParameter ExportArtifacts { get; set; } #Parameter(Mandatory = false) Alias(["Artifacts"])public String ArtifactsDirectory { get; set; } #Parameter(Mandatory = false) Alias(["ArtifactsPath"])public SwitchParameter DisableParallel { get; set; } #Parameter(Mandatory = false)public Nullable<Int32> ThrottleLimit { get; set; } #Parameter(Mandatory = false) ValidateRange(1, 128)public Nullable<Int32> MaxParallelism { get; set; } #Parameter(Mandatory = false) ValidateRange(1, 128)public Nullable<Int32> DnsParallelism { get; set; } #Parameter(Mandatory = false) ValidateRange(1, 128)public DnsEndpoint[] DnsEndpoints { get; set; } #Parameter(Mandatory = false)public MultiResolverStrategy MultiResolverStrategy { get; set; } #Parameter(Mandatory = false)public Nullable<Int32> MultiResolverMaxParallelism { get; set; } #Parameter(Mandatory = false)public PSEventManager Events { get; } #public PSHost Host { get; } #public CommandInvocationIntrinsics InvokeCommand { get; } #public ProviderIntrinsics InvokeProvider { get; } #public JobManager JobManager { get; } #public JobRepository JobRepository { get; } #public InvocationInfo MyInvocation { get; } #public PagingParameters PagingParameters { get; } #public String ParameterSetName { get; } #public SessionState SessionState { get; } #public ICommandRuntime CommandRuntime { get; set; } #public Boolean Stopping { get; } #public CommandOrigin CommandOrigin { get; } #Fields
public String[] NameOrIpAddress #Parameter(Mandatory = true, ParameterSetName = "ServerName", Position = 0) ValidateNotNullOrEmptypublic DnsEndpoint DnsEndpoint #Parameter(Mandatory = false, ParameterSetName = "ServerName", Position = 1)public SwitchParameter FullResponse #Parameter(Mandatory = false, ParameterSetName = "ServerName")