diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecRestoreBackup.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecRestoreBackup.ps1 index 2898b57c89ae..e07e8e139dca 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecRestoreBackup.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecRestoreBackup.ps1 @@ -41,7 +41,7 @@ Function Invoke-ExecRestoreBackup { $ht2 = @{} $line.psobject.properties | ForEach-Object { $ht2[$_.Name] = [string]$_.Value } $Table.Entity = $ht2 - Add-CIPPAzDataTableEntity @Table -Force + Add-AzDataTableEntity @Table -Force } Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -message 'Created backup' -Sev 'Debug' diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-ExecStandardConvert.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-ExecStandardConvert.ps1 index 659ca385d93b..915ba2ef475b 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-ExecStandardConvert.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-ExecStandardConvert.ps1 @@ -204,7 +204,7 @@ function Invoke-ExecStandardConvert { $Converted | Add-Member -NotePropertyName 'createdAt' -NotePropertyValue ((Get-Date).ToUniversalTime()) -Force $Converted | Add-Member -NotePropertyName 'updatedBy' -NotePropertyValue 'System' -Force $Converted | Add-Member -NotePropertyName 'updatedAt' -NotePropertyValue (Get-Date).ToUniversalTime() -Force - $JSON = ConvertTo-Json -Depth 40 -InputObject $Converted + $JSON = ConvertTo-Json -Depth 100 -InputObject $Converted -Compress $Table = Get-CippTable -tablename 'templates' $Table.Force = $true diff --git a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-listStandardTemplates.ps1 b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-listStandardTemplates.ps1 index eaeba1486007..ebf7a663e342 100644 --- a/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-listStandardTemplates.ps1 +++ b/Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/Standards/Invoke-listStandardTemplates.ps1 @@ -15,10 +15,10 @@ Function Invoke-listStandardTemplates { $Templates = (Get-CIPPAzDataTableEntity @Table -Filter $Filter) | ForEach-Object { $JSON = $_.JSON try { + $RowKey = $_.RowKey $data = $_.JSON | ConvertFrom-Json -Depth 100 -ErrorAction SilentlyContinue } catch { - Write-Host "Could not load standard template: $($_.Exception.Message). Content of the template is: $($JSON)." - Write-Host "Template GUID: $($_.GUID)" + Write-Host "$($RowKey)" return } $data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.GUID -Force