Today, I came across this scenario where we had to test SQL connection from a VM which did not have SQL Server management studio, one option is installing SQL Server on VM - but I didn't see any point on installing SSMS just for the sake testing connectivity.
Here are the steps I used to test the connection without using SSMS
1. Create a new file with .udl extension in any of the drives on VM

2. double clicking on .UDL file will open up data link properties window as below.
3. Enter Server Name and Credentials and click Test Connection
That's it, you are done :)
Here are the steps I used to test the connection without using SSMS
1. Create a new file with .udl extension in any of the drives on VM
2. double clicking on .UDL file will open up data link properties window as below.
3. Enter Server Name and Credentials and click Test Connection
That's it, you are done :)


