Changing SQL Server Port with Powershell

Published 07 May 12 05:48 PM | MartinBell

The other week, we were fortunate to have Mark Broadbent (blog\twitter) as a guest speaker at the Leeds SQL Server User Group. he did a great presentation on using Windows Server Core and SQL Server. If you haven’t taken time to learn Powershell then this could be the best reason to do so. Of course if you are already have your own toolbox of Powershell scripts to administer SQL Server on other editions of Windows, moving to Windows Core will be a doddle!

I have previously posted blogs about stopping/starting SQL Server using Powershell, and also enabling protocols with a Powershell script so when Mark mentioned Powershell as one option to change the TCP/IP port for an SQL Server Instance I thought I would write my own.

I incorporated into the scripts a check to make sure the instigator was a “real administrator” and also to prompt the user to start/restart the SQL Server instance to allow the changes to take effect.

The script can be found here.

Filed under: ,


# Dew Drop – May 8, 2012 (#1,322) | Alvin Ashcraft's Morning Dew said on May 8, 2012 12:41 PM:

Pingback from  Dew Drop – May 8, 2012 (#1,322) | Alvin Ashcraft's Morning Dew

This Blog

SQL Blogs