As you know, with the new version of SSMS since the version 18, the tools like sqlcmd are no more included in the installation.

You need to download separately the tools that you need here

Few months ago, Microsoft announces the replacement of the “old” sqlcmd with a new version called go-sqlcmd.

This new version includes all parameters from the “old” sqlcmd but also new parameters such as the connection to the Azure Active Directory authentication. Following my curiosity and the Microsoft Learn article on this new tools, I begin with the installation.


The article is very clear about the installation, and I just follow the steps.

Step 1: Check if Winget is installed

My Test VM is under Windows Server 2022 and I run a cmd session:

I have the message “winget is not recognized as an internal command”. This means that Winget is not install and need to be download here

After this step, following the error, I download the Microsoft.UI.Xaml.2.7…

I install this package and winget but when I check, winget is not recognized…

Ok, no Problem, I google… And finally find this great and useful article from Andreas Nick:

Install WinGet and AppInstaller on Windows Server 2022

Following all steps explained in the blog, I finally success to install Winget…

Step 2: Install go-sqlcmd

To install go-sqlcmd, i run the command: winget install sqlcmd

It’s very quick and you just need at the end to confirm the agreements terms after reading it like usual…

And after the download, the package is installed on my VM under Windows Server 2022

Step 3: Verify the installation

To verify the installation, reopen a new CMD windows and type sqlcmd:

You can see that I have the error “The system cannot find the file specifified“.
At this point and following the documentation, I type sqlcmd –help:

You can see in Feedback the go-sqlcmd to confirm the installation.
These steps already take a lot of time and I stop the blog at this point.
I hope this blog can help you during your testing…

See you soon for the next steps and the real testing of the go-sqlcmd!