Domain Detective

API Reference

Class

CmdletTestDnsBlacklist

Namespace DomainDetective.PowerShell
Assembly DomainDetective.PowerShell
Implements
IDisposable
Modifiers sealed
Attributes
Cmdlet("Test", "DDDnsBlacklist", DefaultParameterSetName = "ServerName") Alias(["Test-DnsBlacklist", "Test-DnsDomainBlacklist", "Test-DDDnsDomainBlacklist", "Test-DDDnsBlacklistRecord"])

Queries DNSBL providers to see if domains or IPs are listed.

Inheritance

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

Methods

BeginProcessingAsync() #

Prepares the DNSBL health check and logging.

Returns

A completed task.

ProcessRecordAsync() #

Checks the specified host names or IP addresses against DNSBL lists.

Returns

A task that represents the asynchronous operation.

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")

Fields

public String[] NameOrIpAddress #
Parameter(Mandatory = true, ParameterSetName = "ServerName", Position = 0) ValidateNotNullOrEmpty
public DnsEndpoint DnsEndpoint #
Parameter(Mandatory = false, ParameterSetName = "ServerName", Position = 1)
public SwitchParameter FullResponse #
Parameter(Mandatory = false, ParameterSetName = "ServerName")
{{ include "footer" }}