Script/command - query sql server & configure firewall rules?

rated by 0 users
This post has 1 Reply | 1 Follower

Top 50 Contributor
Posts 149
JakeS Posted: 04-25-2012 1:44 AM

I am trying to find a way to use powershell to query a sql server and provide back the instance names with the port numbers used, then ideally get the port numbers and add them to specific rules I create for the Windows firewall.

Currently I use the netsh commands for the firewall config and go to the gui to locate the ports.


Top 10 Contributor
Posts 640

Prior to Win8, there are no cmdlets for querying the firewall or modifying it. And prior to SQL2012 I'm not aware of any that could be used to gather that SQL information. I'm not a SQL PowerShell expert, though.

Page 1 of 1 (2 items) | RSS
Copyright 2012 All rights reserved.