dbatools is a free PowerShell module with over 300 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


Start-DbaSqlService

Starts the SQL Server related services on one or more computers. Will follow SQL Server service dependencies.

Requires Local Admin rights on destination computer(s).

Screenshots

dbatools - Start-DbaSqlService

Examples

Starts the SQL Server related services on computer sqlserver2014a.

Start-DbaSqlService -ComputerName sqlserver2014a

Gets the SQL Server related services on computers sql1, sql2 and sql3 and starts them.

‘sql1′,’sql2’,’sql3’| Get-DbaSqlService | Start-DbaSqlService

Starts the SQL Server services related to the default instance MSSQLSERVER on computers sql1 and sql2.

Start-DbaSqlService -ComputerName sql1,sql2 -Instance MSSQLSERVER

Starts the SQL Server related services of type “SSRS” (Reporting Services) on computers in the variable MyServers.

Start-DbaSqlService -ComputerName $MyServers -Type SSRS

Author

This command was created by Kirill Kravtsov. You can find Kirill on Twitter.

Get-Help

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

Source Code

Want to see the source code? View Start-DbaSqlService.ps1 on GitHub
 

Related commands