formatting
This commit is contained in:
15
local/scripts/run_sc.ps1
Normal file
15
local/scripts/run_sc.ps1
Normal file
@@ -0,0 +1,15 @@
|
||||
param (
|
||||
[string]$Action,
|
||||
[string]$ServiceName
|
||||
)
|
||||
|
||||
if ($Action -eq "start") {
|
||||
sc.exe start $ServiceName
|
||||
} elseif ($Action -eq "stop") {
|
||||
sc.exe stop $ServiceName
|
||||
} elseif ($Action -eq "restart") {
|
||||
sc.exe stop $ServiceName
|
||||
sc.exe start $ServiceName
|
||||
} else {
|
||||
Write-Error "Invalid action specified. Use 'start', 'stop', or 'restart'."
|
||||
}
|
||||
Reference in New Issue
Block a user