File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Entrypoints/HTTP Functions/Tenant/Standards Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,13 @@ Function Invoke-listStandardTemplates {
1313 $Table = Get-CippTable - tablename ' templates'
1414 $Filter = " PartitionKey eq 'StandardsTemplateV2'"
1515 $Templates = (Get-CIPPAzDataTableEntity @Table - Filter $Filter ) | ForEach-Object {
16- $JSON = $_.JSON
16+ $JSON = $_.JSON -replace ' "Action": ' , ' "action": '
1717 try {
1818 $RowKey = $_.RowKey
19- $data = $_.JSON | ConvertFrom-Json - Depth 100 - ErrorAction SilentlyContinue
19+ $data = $JSON | ConvertFrom-Json - Depth 100 - ErrorAction SilentlyContinue
20+
2021 } catch {
21- Write-Host " $ ( $RowKey ) "
22+ Write-Host " $ ( $RowKey ) standard could not be loaded: $ ( $_ .Exception.Message ) "
2223 return
2324 }
2425 $data | Add-Member - NotePropertyName ' GUID' - NotePropertyValue $_.GUID - Force
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function Invoke-CIPPStandardRetentionPolicyTag {
1919 $StateIsCorrect = ($CurrentState.Name -eq $PolicyName ) -and
2020 ($CurrentState.RetentionEnabled -eq $true ) -and
2121 ($CurrentState.RetentionAction -eq ' PermanentlyDelete' ) -and
22- ($CurrentState.AgeLimitForRetention -eq $Settings.AgeLimitForRetention ) -and
22+ ($CurrentState.AgeLimitForRetention -eq ([ timespan ]::FromDays( $Settings.AgeLimitForRetention )) ) -and
2323 ($CurrentState.Type -eq ' DeletedItems' ) -and
2424 ($PolicyState.RetentionPolicyTagLinks -contains $PolicyName )
2525
You can’t perform that action at this time.
0 commit comments