Skip to content
Snippets Groups Projects
Commit 0ead6bb0 authored by Niko Ehrenfeuchter's avatar Niko Ehrenfeuchter :keyboard:
Browse files

Set ErrorActionPreference to "Stop".

parent 9913229a
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
function Start-MyService {
Write-Host -NoNewLine "Starting service $($ServiceName): "
try {
Start-Service $ServiceName -ErrorAction Stop
Start-Service $ServiceName
Write-Host "[OK]" -Fore Green
}
catch {
......@@ -74,6 +74,9 @@ function Install-Service {
}
$ErrorActionPreference = "Stop"
$LocalConfiguration = ".\ScriptsConfig.ps1"
if (Test-Path $LocalConfiguration) {
. $LocalConfiguration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment