Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Jan 21, 2025
1 parent 24f665d commit 28908ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ 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 "Could not load standard template: $($_.Exception.Message)."
Write-Host "Template GUID: $($RowKey)"
return
}
$data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.GUID -Force
Expand Down

0 comments on commit 28908ed

Please sign in to comment.