How to Get WSFC Name Using T-SQL
@Molenpad, you shall get the WSFC details through below mention TSQL query.

select * from master.sys.dm_hadr_cluster;
Go


Here cluster_name is the Name of the WSFC cluster that hosts the instances of SQL Server that are enabled for Always On availability groups.

I am also attaching the screen shot.


Note: I have highlighted the WSFC name due to my Prod server.

for your ref Here