If you want to run SQL commands from your PowerShell terminal you can do so by simply installing the SQLServer module with the command below: You will be prompted to install from an untrusted source. Type “A” to accept and install the module. Once it is complete you can see…
Want to improve your IT skillset? Start with a free account and get access to our IT labs!
Table of Contents
Related Courses
If you want to run SQL commands from your PowerShell terminal you can do so by simply installing the SQLServer module with the command below:
Install-Module sqlserver
![Image](https://media.serveracademy.com/wp-content/uploads/2021/07/17172237/image.png)
You will be prompted to install from an untrusted source. Type “A” to accept and install the module.
Once it is complete you can see all the new commands you have available to you by running the following command:
Get-Command -Module SQLServer
![Image 1](https://media.serveracademy.com/wp-content/uploads/2021/07/17172236/image-1.png)
And that’s it! Now you can run commands like Invoke-SqlCMD!