Blog Post

PowerShell Script to configure SQL Server static Port

,

The article How to configure a static port for SQL Server? Explains the process of setting a non-default static port using SQL Server Configuration Manager. Can we do the same task using PowerShell Script?

Yes, we can set SQL Server static port using a PS script. Take the script from ,GitHub and open it in the Windows PowerShell IDE.

Specify the SQL Instance name ( in case of named instance) and SQL static port that we want to set. Execute the PowerShell script, and it sets static port followed by a restart SQL Service to take new port in effect.

PowerShell script to modify SQL Server port

Original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating