dbatools is a free PowerShell module with over 200 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaServerProtocol

Gets the SQL Server related server protocols on one or more computers. Requires Local Admin rights on destination computer(s). The server protocols can be enabled and disabled when retrieved via WSMan.

Screenshots

Examples

To get the SQL Server related server protocols on computer sqlserver2014a.

Get-DbaServerProtocol -ComputerName sqlserver2014a

To get the SQL Server related server protocols on computers sql1, sql2 and sql3.

‘sql1′,’sql2′,’sql3’ | Get-DbaServerProtocol

To get the SQL Server related server protocols on computers sql1 and sql2, and shows them in a grid view.

Get-DbaServerProtocol -ComputerName sql1,sql2 | Out-Gridview

Disables the VIA ServerNetworkProtocol on computer sql1. If succesful, returncode 0 is shown.

(Get-DbaServerProtocol -ComputerName sql1 | Where { $_.DisplayName = ‘via’ }).Disable()

Author

This command was created by Klaas Vandenberghe. You can find Klaas on Twitter and his blog.

Get-Help

From PowerShell, execute Get-Help Get-DbaServerProtocol -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaServerProtocol.ps1 on GitHub
 

Related commands