try to cleanup sfc output in ticket comment

This commit is contained in:
2024-06-17 14:13:37 -04:00
parent 2ae279c429
commit 16e8701bfc
+1 -1
View File
@@ -5,7 +5,7 @@ Set-Content -Path $tempFile -Value $(Get-Content -Path $tempFile -Encoding Unico
$SFCOutput = Get-Content -Path $tempFile
$TicketComment = "SFC Output:`n"
ForEach ( $line in $SFCOutput ) {
If ( $line -notmatch '^Verification \d{1,3}% complete\.$' ) { $TicketComment = $TicketComment + $line + "`n" }
If ( $line -notmatch 'Verification \d{1,2}% complete\.' ) { $TicketComment = $TicketComment + $line + "`n" }
}
If ( $TicketID ) { Create-Syncro-Ticket-Comment -TicketIdOrNumber $TicketID -Subject "Update" -Body $TicketComment -Hidden $true -DoNotEmail $true }
Remove-Item $tempFile -Force -ErrorAction SilentlyContinue