Skip to content

Instantly share code, notes, and snippets.

View fireflycons's full-sized avatar

Alistair Mackay fireflycons

View GitHub Profile
@fireflycons
fireflycons / sql-server-all-enable-dynamic-tcp.ps1
Last active September 6, 2018 04:31 — forked from FeodorFitsner/sql-server-all-enable-dynamic-tcp.ps1
Enable dynamic TCP ports for all SQL Server instances (so they can be run simultaneously)
<#
.SYNOPSIS
Set all installed instances of SQL server to dynamic ports
#>
Get-ChildItem -Path 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server\' |
Where-Object {
$_.Name -imatch 'MSSQL[_\d]+\.SQL.*'
} |
ForEach-Object {