Skip to content

Commit

Permalink
Update New-HaloPSATicket.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
BNWEIN authored Nov 15, 2023
1 parent f8570ff commit 26ada69
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Modules/CippExtensions/Private/New-HaloPSATicket.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ function New-HaloPSATicket {

Write-Host "Sending ticket to HaloPSA"
Write-Host $body
try {
$Ticket = Invoke-RestMethod -Uri "$($Configuration.ResourceURL)/Tickets" -ContentType 'application/json; charset=utf-8' -Method Post -Body $body -Headers @{Authorization = "Bearer $($token.access_token)" }
}
catch {
Write-Host "Failed to send ticket to HaloPSA"
Write-Host $_.Exception.Message
}

$Ticket = Invoke-RestMethod -Uri "$($Configuration.ResourceURL)/Tickets" -ContentType 'application/json; charset=utf-8' -Method Post -Body $body -Headers @{Authorization = "Bearer $($token.access_token)" }


}
}

0 comments on commit 26ada69

Please sign in to comment.