function for setting up sql ports and options

Job ID: 31693309

Budget: $10 – $30 USD

Hi
Often times i install a new SQL server instance by a client
then i need to do a bunch of configurations manually
i need code that i can run in ssms (or powershell, but better ssms) that does the following
1. sets login security to mixed (windows and sql server)
2. disables "enforce password policy"
3. enables tcp/ip by protocols
4. set dynamic listening port to 1433 (TCP>IPALL>TCPPORT)
5. sets TCP>IPALL>TCPDYNAMICPORTS to nothing/empty
6. if windows firewall doesnt have 1433 open , then add such a rule to windows firewall

Thanks!