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: ps-services/Invoke-ServiceManager.ps1
+42-41Lines changed: 42 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -1,47 +1,49 @@
1
-
FunctionManage-Service {
1
+
FunctionInvoke-ServiceManager {
2
2
<#
3
3
.SYNOPSIS
4
-
Perform various operations on Windows services.
4
+
Manages Windows services, allowing various actions such as starting, stopping, restarting, and configuring service properties.
5
5
6
6
.DESCRIPTION
7
-
This function allows you to perform different operations on Windows services, such as starting, stopping, restarting, pausing, continuing, enabling or disabling auto-start, setting recovery options, retrieving service description and dependencies, and more.
8
-
7
+
This function provides a range of functionalities to manage Windows services, including starting, stopping, restarting, pausing, continuing, enabling auto-start, disabling auto-start, setting recovery options, retrieving service information, and more.
8
+
9
9
.PARAMETERServiceName
10
-
Mandatory - specifies the name of the Windows service to be managed.
10
+
Specifies the name of the service to manage.
11
11
.PARAMETERAction
12
-
Mandatory - specifies the action to perform on the service.
NotMandatory - forces the specified action, even if it may result in unintended consequences.
14
+
Forces the action to be performed without prompting for confirmation.
15
15
.PARAMETERWhatIf
16
-
NotMandatory - simulates the action without actually performing it, providing a preview of the outcome.
16
+
Simulates the action without actually performing it.
17
17
.PARAMETERRetryCount
18
-
NotMandatory - the number of times to retry the action in case of failure.
18
+
Specifies the number of times to retry the action on failure.
19
19
.PARAMETERRetryDelay
20
-
NotMandatory - specifies the delay in seconds between retry attempts.
20
+
Specifies the delay in seconds between retry attempts.
21
21
.PARAMETERIncludeLogs
22
-
NotMandatory - includes detailed action logs in the output.
22
+
Specifies whether to include detailed action logs.
23
23
.PARAMETERRestartDelay
24
-
NotMandatory - delay in seconds before restarting a service during recovery.
24
+
Specifies the delay in seconds before restarting a service during recovery.
25
25
.PARAMETERRecoveryAttempts
26
-
NotMandatory - the number of recovery attempts during service recovery.
26
+
Specifies the number of recovery attempts during service recovery.
27
27
.PARAMETERRecoveryDelay
28
-
NotMandatory - the delay in seconds between recovery attempts.
28
+
Specifies the delay in seconds between recovery attempts.
29
+
.PARAMETERLogOnAccount
30
+
Specifies the account under which the service runs.
29
31
.PARAMETERDisplayName
30
-
NotMandatory - display name of the Windows service, use this parameter to provide a user-friendly name for the service that is different from its actual name.
32
+
Specifies the display name of the service.
31
33
.PARAMETERRecoveryActions
32
-
NotMandatory - specifies the recovery actions to be configured for the service during recovery.
34
+
Specifies specific recovery actions for the service.
33
35
.PARAMETERCommand
34
-
NotMandatory - command to be executed during recovery if the specified recovery actions are triggered.
0 commit comments