Target Computer Name Mismatch

4/26/2018 18846 Contributors

You receive the error, Target Computer Name Mismatch, or other similar error indicating that DNS resolution for the target machine has failed or (rare) that the trust relationship between the target machine and the domain is broken.

This error is typically encountered when the name of the target machine does not match the machine PDQ is connecting to. The culprit is usually misconfigured DNS or stale DNS records.

In rare cases, the error can occur if the target machine doesn’t recognize domain credentials due to a broken trust relationship between the domain and the target machine. In these exceptionally rare cases, please refer to this article for the recommended fix.

DNS Troubleshooting:
To troubleshoot DNS, ensure that the target computer is the correct computer. This can be accomplished by performing the following:

1. On the PDQ console machine, open an administrative/elevated command prompt and run ONE of the following,

ipconfig /flushdns


sc stop dnscache && sc start dnscache

2. From the same or new administrative/elevated command prompt run, 

nslookup TARGET

Using the IP address returned from the results of the nslookup command above run,

nbtstat -A <IP_Address>

For example:

IMPORTANT: Microsoft released an update in 2016 that prevents NetBIOS resolution traversing different networks and subnets. If the PDQ console is on a different network/subnet than the target machine, nbtstat -A results will typically result in, "Host not found." In these cases, login to a machine on the same network/subnet as the target and perform the nbtstat -A test.

3. Attempt to ping the target machine from the PDQ console. Like performing an nslookup, this will show the IP of the target machine as returned from the DNS server.  

4. From the PDQ console machine, go to Start > Run > \\TARGET\ADMIN$. If you are unable to access the ADMIN$ of the target machine AND you receive the Target Name Mismatch error in PDQ, DNS is likely the culprit. When attempting to access the ADMIN$, you might see an error like this:
Or this:

5. Where the results of the above are inconclusive, you may need to log into the target machine physically or retrieve the IP information from the user (e.g. have them run ipconfig from a command prompt). Check the actual IP information against either an nslookup query or the DNS record on the DNS server.

Recommended Fixes:
If you are using Microsoft DNS, try the following:

Scavenge Stale DNS Records:
In order to manually scavenge DNS records, scavenging must be enabled on the record, the zone, and the server. Additionally, the record must have a timestamp and the zone must be running.

To set up scavenging, perform the following:

1. Open the DNS MMC.

2. Click on View > Advanced to enable (checked) the advanced views.

3. Right-click > Properties any (A) record with a timestamp in the zone you wish to scavenge and ensure the "Delete this record when it becomes stale" is checked.

4. Next, right-click > Properties on the zone you wish to scavenge and click on the General tab > Aging button:

And ensure "Scavenge stale resource records" is checked:

5. On the DNS server, right-click > Properties > Advanced tab and check the, "Enable automatic scavenging of stale records."

Once scavenging has been configured for the resource record, the zone(s), and the server, run the following command from an administrative/elevated command prompt on the DNS server (changes should replicate to all member DNS servers).

dnscmd /startscavenging

Or, from an administrative/elevated PowerShell prompt on the DNS server, run,

Start-DnsServerScavenging -Verbose

Or, from the DNS MMC, right-click the DNS server and select "Scavenge Stale Resource Records".

Setting DHCP to Update DNS:
If you are using Windows DHCP, the following setting is recommended for environments where machines move in and out of the network frequently.

1. Open the DHCP MMC.

2. Right-click either the scope or the protocol (e.g. IPv4) > Properties > DNS tab and ensure the following is enabled:

Additional information regarding DNS can be found in the following:

And a blog article, Healthy DNS Will Keep PDQ Inventory and PDQ Deploy Hummin’ Along