dataplat / dbatools

🚀 SQL Server automation and instance migrations have never been safer, faster or freer
https://dbatools.io
MIT License
2.39k stars 788 forks source link

Update New-DBAFirewallRule to target the executables instead of TCP/UDP port #9229

Open areis422 opened 5 months ago

areis422 commented 5 months ago

Summarize Functionality

When creating the firewall rule, query the registry for the executable for sqlbrowsr.exe and sqlservr.exe, use those as the Program value for both Default Instance and named instances image

Is there a command that is similiar or close to what you are looking for?

Yes

Technical Details

Right now, it creates port based rules, but to make things easier, targeting the exe would allow named instances running on different ports or the default instance running on a non-standard port to automatically be allowed.