You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: assets/dbatools-index.json
+43-7Lines changed: 43 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -25437,11 +25437,11 @@
25437
25437
"CommandName": "Get-DbaService",
25438
25438
"Availability": "Windows only",
25439
25439
"Links": "https://dbatools.io/Get-DbaService",
25440
-
"Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaService -ComputerName sqlserver2014a\nGets the SQL Server related services on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027 | Get-DbaService -AdvancedProperties\nGets the SQL Server related services on computers sql1, sql2 and sql3. Includes Advanced Properties from the SqlServiceAdvancedProperty Namespace\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$cred = Get-Credential WindowsUser\nPS C:\\\u003e Get-DbaService -ComputerName sql1,sql2 -Credential $cred | Out-GridView\nGets the SQL Server related services on computers sql1 and sql2 via the user WindowsUser, and shows them in a grid view.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaService -ComputerName sql1,sql2 -InstanceName MSSQLSERVER\nGets the SQL Server related services related to the default instance MSSQLSERVER on computers sql1 and sql2.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaService -ComputerName $MyServers -Type SSRS\nGets the SQL Server related services of type \"SSRS\" (Reporting Services) on computers in the variable MyServers.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003e$MyServers = Get-Content .\\servers.txt\nPS C:\\\u003e Get-DbaService -ComputerName $MyServers -ServiceName MSSQLSERVER,SQLSERVERAGENT\nGets the SQL Server related services with ServiceName MSSQLSERVER or SQLSERVERAGENT for all the servers that are stored in the file. Every line in the file can only contain one hostname for a server.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e$services = Get-DbaService -ComputerName sql1 -Type Agent,Engine\nPS C:\\\u003e $services.ChangeStartMode(\u0027Manual\u0027)\nGets the SQL Server related services of types Sql Agent and DB Engine on computer sql1 and changes their startup mode to \u0027Manual\u0027.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003e(Get-DbaService -ComputerName sql1 -Type Engine).Restart($true)\nCalls a Restart method for each Engine service on computer sql1.",
25440
+
"Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eGet-DbaService -ComputerName sqlserver2014a\nGets the SQL Server related services on computer sqlserver2014a.\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003e\u0027sql1\u0027,\u0027sql2\u0027,\u0027sql3\u0027 | Get-DbaService -AdvancedProperties\nGets the SQL Server related services on computers sql1, sql2 and sql3. Includes Advanced Properties from the SqlServiceAdvancedProperty Namespace\n-------------------------- EXAMPLE 3 --------------------------\nPS C:\\\u003e$cred = Get-Credential WindowsUser\nPS C:\\\u003e Get-DbaService -ComputerName sql1,sql2 -Credential $cred | Out-GridView\nGets the SQL Server related services on computers sql1 and sql2 via the user WindowsUser, and shows them in a grid view.\n-------------------------- EXAMPLE 4 --------------------------\nPS C:\\\u003eGet-DbaService -ComputerName sql1,sql2 -InstanceName MSSQLSERVER\nGets the SQL Server related services related to the default instance MSSQLSERVER on computers sql1 and sql2.\n-------------------------- EXAMPLE 5 --------------------------\nPS C:\\\u003eGet-DbaService -SqlInstance sql1, sql1\\test, sql2\\test\nGets the SQL Server related services related to the default instance MSSQLSERVER on computers sql1, the named instances test on sql1 and sql2.\n-------------------------- EXAMPLE 6 --------------------------\nPS C:\\\u003eGet-DbaService -ComputerName $MyServers -Type SSRS\nGets the SQL Server related services of type \"SSRS\" (Reporting Services) on computers in the variable MyServers.\n-------------------------- EXAMPLE 7 --------------------------\nPS C:\\\u003e$MyServers = Get-Content .\\servers.txt\nPS C:\\\u003e Get-DbaService -ComputerName $MyServers -ServiceName MSSQLSERVER,SQLSERVERAGENT\nGets the SQL Server related services with ServiceName MSSQLSERVER or SQLSERVERAGENT for all the servers that are stored in the file. Every line in the file can only contain one hostname for a server.\n-------------------------- EXAMPLE 8 --------------------------\nPS C:\\\u003e$services = Get-DbaService -ComputerName sql1 -Type Agent,Engine\nPS C:\\\u003e $services.ChangeStartMode(\u0027Manual\u0027)\nGets the SQL Server related services of types Sql Agent and DB Engine on computer sql1 and changes their startup mode to \u0027Manual\u0027.\n-------------------------- EXAMPLE 9 --------------------------\nPS C:\\\u003e(Get-DbaService -ComputerName sql1 -Type Engine).Restart($true)\nCalls a Restart method for each Engine service on computer sql1.",
25441
25441
"Params": [
25442
25442
[
25443
25443
"ComputerName",
25444
-
"The target SQL Server instance or instances.",
25444
+
"The target computer(s).",
25445
25445
"cn,host,Server",
25446
25446
false,
25447
25447
"true (ByValue)",
@@ -25450,13 +25450,22 @@
25450
25450
],
25451
25451
[
25452
25452
"InstanceName",
25453
-
"Only returns services that belong to the specific instances.",
25453
+
"Only returns services that belong to the specific instances on all target computers.",
25454
25454
"Instance",
25455
25455
false,
25456
25456
"false",
25457
25457
"",
25458
25458
""
25459
25459
],
25460
+
[
25461
+
"SqlInstance",
25462
+
"Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers.\nParameters ComputerName and InstanceName will be ignored if SqlInstance is used.",
25463
+
"",
25464
+
false,
25465
+
"false",
25466
+
"",
25467
+
""
25468
+
],
25460
25469
[
25461
25470
"Credential",
25462
25471
"Credential object used to connect to the computer as a different user.",
"Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers.\nParameters ComputerName and InstanceName will be ignored if SqlInstance is used.",
50882
+
"",
50883
+
false,
50884
+
"false",
50885
+
"",
50886
+
""
50887
+
],
50870
50888
[
50871
50889
"Type",
50872
50890
"Use -Type to collect only services of the desired SqlServiceType.\r\nCan be one of the following: \"Agent\", \"Browser\", \"Engine\", \"FullText\", \"SSAS\", \"SSIS\", \"SSRS\", \"PolyBase\", \"Launchpad\"",
"Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers.\nParameters ComputerName and InstanceName will be ignored if SqlInstance is used.",
59522
+
"",
59523
+
false,
59524
+
"false",
59525
+
"",
59526
+
""
59527
+
],
59501
59528
[
59502
59529
"Type",
59503
59530
"Use -Type to collect only services of the desired SqlServiceType.\r\nCan be one of the following: \"Agent\",\"Browser\",\"Engine\",\"FullText\",\"SSAS\",\"SSIS\",\"SSRS\"",
"Use a combination of computername and instancename to get the SQL Server related services for specific instances on specific computers.\nParameters ComputerName and InstanceName will be ignored if SqlInstance is used.",
60470
+
"",
60471
+
false,
60472
+
"false",
60473
+
"",
60474
+
""
60475
+
],
60440
60476
[
60441
60477
"Type",
60442
60478
"Use -Type to collect only services of the desired SqlServiceType.\r\nCan be one of the following: \"Agent\",\"Browser\",\"Engine\",\"FullText\",\"SSAS\",\"SSIS\",\"SSRS\"",
0 commit comments