where can I find the DNS name associated to the listener of an Availability Group?
The message that is returned is not accurate as it is referring to the name that it will give the network name resource (SQLPROD_AG_SQLPROD), and it is labelled incorrectly as the DNS name.  You can see that the network name resource in your AG is named SQLPROD_AG_SQLPROD, and that is what it's referring to.

It really should say something like, "The availability group 'SQLPROD_AG' already has a listener with a network name resource of 'SQLPROD_AG_SQLPROD'."  When the listener is created, the associated network name resource is created with a name according to the following syntax:

&lt;Availability Group Name&gt;_&lt;DNS name&gt;


Since a resource with that name already exists, it can't create it.

Also, underscores aren't allowed in DNS names, so the name given in the error message is obviously not a DNS name.

To see the DNS name associated with the listener, you can use SQL Server Management Studio and view the properties of the listener, or use Failover Cluster Administrator and view the properties of the network name.

The following PowerShell command will return the names and DNS names of all network name resources that are not core cluster resources.

Get-ClusterResource | Where-Object {$_.isCoreResource -eq $false -and $_.ResourceType -eq "Network Name" } | Get-ClusterParameter | Where-Object { $_.Name -eq "DnsName" } | Select ClusterObject, Value


If you want to filter by a specific AG name, you would use Where-Object {$_.OwnerGroup -eq "SQLPROD_AG" -and $_.ResourceType -eq "Network Name' } for the first WHERE clause.

With T-SQL, you can get this from the AG-related views.  To list all:

select ag.name, agl.dns_name from sys.availability_group_listeners agl
join sys.availability_groups ag ON ag.group_id = agl.group_id


To list only the one for SQLPROD_AG, you would just need to add a WHERE clause:

WHERE ag.name = 'SQLPROD_AG'


If you're wanting to use a different DNS name for the listener, you have to drop the current listener and create a new one.  

ALTER AVAILABILITY GROUP SQLPROD_AG REMOVE LISTENER 'SQLPROD'


See Remove an availability group listener.