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

Some whitespace cleanups

parent cd3e5cac
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ function ServiceIsBusy { ...@@ -56,7 +56,7 @@ function ServiceIsBusy {
function Get-ServiceAccount([string]$ServiceName) { function Get-ServiceAccount([string]$ServiceName) {
try { try {
$Account = $(Get-WmiObject Win32_Service | $Account = $(Get-WmiObject Win32_Service |
Where-Object { $_.Name -match $ServiceName }).StartName Where-Object { $_.Name -match $ServiceName }).StartName
} }
catch { catch {
...@@ -78,7 +78,7 @@ function Check-PerformanceMonitormembership() { ...@@ -78,7 +78,7 @@ function Check-PerformanceMonitormembership() {
Write-Verbose "Validated membership in group [$($GroupName)]." Write-Verbose "Validated membership in group [$($GroupName)]."
} }
catch { catch {
Log-Warning $("Service account [$($ServiceAccount)] is NOT a member of" Log-Warning $("Service account [$($ServiceAccount)] is NOT a member of"
"the local group [$($GroupName)], monitoring CPU load" "the local group [$($GroupName)], monitoring CPU load"
" >>>> WILL NOT WORK! <<<<") " >>>> WILL NOT WORK! <<<<")
} }
...@@ -309,7 +309,7 @@ function Update-Configuration { ...@@ -309,7 +309,7 @@ function Update-Configuration {
Write-Verbose "Updating configuration files:`n> $($NewComm)`n> $($NewHost)" Write-Verbose "Updating configuration files:`n> $($NewComm)`n> $($NewHost)"
Stop-MyService "Updating configuration using files at [$($UpdPathConfig)]." Stop-MyService "Updating configuration using files at [$($UpdPathConfig)]."
$Ret = Update-File $NewComm $ConfigPath $Ret = Update-File $NewComm $ConfigPath
# only continue if the first update worked: # only continue if the first update worked:
if ($Ret) { if ($Ret) {
...@@ -403,7 +403,7 @@ function Find-InstallationPackage { ...@@ -403,7 +403,7 @@ function Find-InstallationPackage {
Where-Object {$_ -match $Pattern} | Where-Object {$_ -match $Pattern} |
Sort-Object | Sort-Object |
Select-Object -Last 1 Select-Object -Last 1
if ([string]::IsNullOrEmpty($PkgDir)) { if ([string]::IsNullOrEmpty($PkgDir)) {
Log-Error "couldn't find installation package matching '$($Pattern)'!" Log-Error "couldn't find installation package matching '$($Pattern)'!"
Exit Exit
...@@ -704,7 +704,7 @@ try { ...@@ -704,7 +704,7 @@ try {
$msg = "Updating the service binaries failed, $($Me) terminating!" $msg = "Updating the service binaries failed, $($Me) terminating!"
Log-Error $msg Log-Error $msg
Send-MailReport -Subject "updated failed!" -Body $msg Send-MailReport -Subject "updated failed!" -Body $msg
Exit Exit
} }
Check-PerformanceMonitormembership Check-PerformanceMonitormembership
} }
...@@ -740,4 +740,4 @@ Send-MailReport -Subject "$UpdSummary" -Body "$UpdDetails" ...@@ -740,4 +740,4 @@ Send-MailReport -Subject "$UpdSummary" -Body "$UpdDetails"
Upload-LogFiles Upload-LogFiles
Log-Debug "$($Me) finished." Log-Debug "$($Me) finished."
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment