INSTALLING INVOKE-SQLCMD

The Invoke-Sqlcmd module is a PowerShell module that will allow you to execute T-SQL statements.

In order to install the Invoke-Sqlcmd module, you will need to open PowerShell.

Before installing the module, you need to set the execution policy to “AllSigned”. To do this, type the following command:

 

Using the -Scope Process flag will limit the execution policy change to the current PowerShell window that is open.

We can now install the Invoke-Sqlcmd module by typing the following command:

 

Here are additional links regarding the Invoke-Sqlcmd:

https://docs.microsoft.com/en-us/sql/powershell/download-sql-server-ps-module?view=sql-server-ver16

Leave a Reply

Your email address will not be published. Required fields are marked *