From 5540225295e9a5fa645a4a48a04e22235436061a Mon Sep 17 00:00:00 2001 From: Troy Harshberger Date: Thu, 22 Feb 2024 08:41:23 -0700 Subject: [PATCH] Add a little bit more logging --- .../IronScales/Get-IronScalesIncidents.ps1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Modules/CippExtensions/IronScales/Get-IronScalesIncidents.ps1 b/Modules/CippExtensions/IronScales/Get-IronScalesIncidents.ps1 index bdb2c6a07e23..bac3ac672687 100644 --- a/Modules/CippExtensions/IronScales/Get-IronScalesIncidents.ps1 +++ b/Modules/CippExtensions/IronScales/Get-IronScalesIncidents.ps1 @@ -51,7 +51,10 @@ function New-IronScalestickets { $ATCompany = Get-AutotaskAPIResource -resource Companies -SimpleSearch "companyname beginswith $($company.Customername.Substring(0,4))" $tTitle = "[IronScales] New Incident(s) for $($company.CustomerName)" - if(Get-ExistingTicket $tTitle){ continue } + if(Get-ExistingTicket $tTitle){ + Write-LogMessage -API 'IronScales' -tenant 'none' -message "An existing Autotask ticket was found for $($company.customername)" -Sev Info + continue + } $body = Get-BodyForTicket $company @@ -65,7 +68,10 @@ function New-IronScalestickets { Write-LogMessage -API 'IronScales' -tenant 'none' -message "Creating Autotask ticket for managed companies" -Sev Info $mTitle = "[IronScales-Managed] New Incident(s)" - if(Get-ExistingTicket $mTitle){ continue } + if(Get-ExistingTicket $mTitle){ + Write-LogMessage -API 'IronScales' -tenant 'none' -message "An existing Autotask ticket was found for managed companies" -Sev Info + continue + } New-AutotaskTicket -atCompany $FulcraATCompany ` -title $mTitle `