diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecCippFunction.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecCippFunction.ps1 index 610b77f5ecae..a7f4e599579b 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecCippFunction.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ExecCippFunction.ps1 @@ -28,6 +28,9 @@ function Invoke-ExecCippFunction { if (Get-Command -Module CIPPCore -Name $Function -and $BlockList -notcontains $Function) { try { $Results = & $Function @Params + if (!$Results) { + $Results = "Function $Function executed successfully" + } $StatusCode = [HttpStatusCode]::OK } catch { $Results = $_.Exception.Message diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/MEM/Invoke-AddIntuneTemplate.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/MEM/Invoke-AddIntuneTemplate.ps1 index 78b33ab7058f..884688b42915 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/MEM/Invoke-AddIntuneTemplate.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/MEM/Invoke-AddIntuneTemplate.ps1 @@ -38,9 +38,9 @@ Function Invoke-AddIntuneTemplate { $body = [pscustomobject]@{'Results' = 'Successfully added template' } } else { - $TenantFilter = $Request.Query.tenantFilter - $URLName = $Request.Query.URLName - $ID = $Request.Query.id + $TenantFilter = $Request.Body.tenantFilter ?? $Request.Query.tenantFilter + $URLName = $Request.Body.URLName ?? $Request.Query.URLName + $ID = $Request.Body.ID ?? $Request.Query.ID $Template = New-CIPPIntuneTemplate -TenantFilter $TenantFilter -URLName $URLName -ID $ID Write-Host "Template: $Template" $object = [PSCustomObject]@{ diff --git a/Modules/CIPPCore/Public/Entrypoints/Invoke-ListIntuneTemplates.ps1 b/Modules/CIPPCore/Public/Entrypoints/Invoke-ListIntuneTemplates.ps1 index 81d9c096811e..37ee1c5bc2a3 100644 --- a/Modules/CIPPCore/Public/Entrypoints/Invoke-ListIntuneTemplates.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/Invoke-ListIntuneTemplates.ps1 @@ -41,7 +41,7 @@ Function Invoke-ListIntuneTemplates { $data | Add-Member -NotePropertyName 'displayName' -NotePropertyValue $_.Displayname -Force $data | Add-Member -NotePropertyName 'description' -NotePropertyValue $_.Description -Force $data | Add-Member -NotePropertyName 'Type' -NotePropertyValue $_.Type -Force - $data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.GUID -Force + $data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.RowKey -Force $data } | Sort-Object -Property displayName } diff --git a/Modules/CIPPCore/Public/Get-CIPPTimerFunctions.ps1 b/Modules/CIPPCore/Public/Get-CIPPTimerFunctions.ps1 index bb353e2f389b..c17c4dd61100 100644 --- a/Modules/CIPPCore/Public/Get-CIPPTimerFunctions.ps1 +++ b/Modules/CIPPCore/Public/Get-CIPPTimerFunctions.ps1 @@ -133,12 +133,13 @@ function Get-CIPPTimerFunctions { Parameters = $Orchestrator.Parameters ?? @{} Cron = $CronString NextOccurrence = $NextOccurrence.ToUniversalTime() - LastOccurrence = $Status.LastOccurrence.DateTime + LastOccurrence = $Status.LastOccurrence Status = $Status.Status OrchestratorId = $Status.OrchestratorId RunOnProcessor = $Orchestrator.RunOnProcessor IsSystem = $Orchestrator.IsSystem ?? $false PreferredProcessor = $Orchestrator.PreferredProcessor ?? '' + ErrorMsg = $Status.ErrorMsg ?? '' } } } else {