Results of using Test-DbaServerName validate that@@SERVERANAME` matches the NetBIOS or computer name of the server hosting the instance. In special cases on case-sensitive collation, and where an AG was created by scripting that if the replica name does not match it's associated @@SERVERNAME, certain things like backup preference can malfunction.
Test-DbaServerName validate that
In the sense that @@SERVERNAME returns SERVER1 but the replica when creating the AG was specified as Server1. If the server collation is configured as case-sensitive use of things like sys.fn_hadr_backup_is_preferred_replica will always return 0 when in fact it should return 1. Reference connect item that touches on this fact.
It will help prevent headaches for folks that are not aware of this.
An alternative to a new command would also be to simply add a parameter switch to the current Test-DbaServereName possibly. Up for discussion.