Skip to content

Commit 0e6fea7

Browse files
committed
Update Install-LTService to recognize AgentI ID 1 as valid
1 parent e7153bc commit 0e6fea7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LabTech.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ Function Install-LTService{
12461246
Write-Host -NoNewline '.'
12471247
Start-Sleep 5
12481248
$tmpLTSI = (Get-LTServiceInfo -EA 0 -Verbose:$False -WhatIf:$False -Confirm:$False -Debug:$False|Select-Object -Expand 'ID' -EA 0)
1249-
} Until ($sw.elapsed -gt $timeout -or $tmpLTSI -gt 1)
1249+
} Until ($sw.elapsed -gt $timeout -or $tmpLTSI -ge 1)
12501250
Write-Host ""
12511251
$sw.Stop()
12521252
Write-Verbose "Completed wait for LabTech Installation after $(([int32]$sw.Elapsed.TotalSeconds).ToString()) seconds."
@@ -1263,7 +1263,7 @@ Function Install-LTService{
12631263
If ( $WhatIfPreference -ne $True ) {
12641264
$tmpLTSI = Get-LTServiceInfo -EA 0 -Verbose:$False -WhatIf:$False -Confirm:$False -Debug:$False
12651265
If (($tmpLTSI)) {
1266-
If (($tmpLTSI|Select-Object -Expand 'ID' -EA 0) -gt 1) {
1266+
If (($tmpLTSI|Select-Object -Expand 'ID' -EA 0) -ge 1) {
12671267
Write-Output "LabTech has been installed successfully. Agent ID: $($tmpLTSI|Select-Object -Expand 'ID' -EA 0) LocationID: $($tmpLTSI|Select-Object -Expand 'LocationID' -EA 0)"
12681268
} ElseIf (!($NoWait)) {
12691269
Write-Error "ERROR: Line $(LINENUM): LabTech installation completed but Agent failed to register within expected period." -ErrorAction Continue

0 commit comments

Comments
 (0)