Powershell Invoke-Sqlcmd –Hostname Parameter sets the Application Name instead of the Host Name
Two of the parameters in SQL Server connections are the Application Name and the Host Name. You can see these in SQL Server if you execute the following command:
![]()
I’ve always been a fan of having applications identify themselves in their connection strings. It makes tasks like tracing much easier. The tools supplied with SQL Server do a reasonable job of that as you can see above. But many other tools don’t do such a good job.
2015-03-19

