Skip to content

Commit

Permalink
Merge pull request #49 from KelvinTegelaar/dev
Browse files Browse the repository at this point in the history
[pull] dev from KelvinTegelaar:dev
  • Loading branch information
pull[bot] authored Feb 3, 2025
2 parents 52b5b42 + 7ec4e3f commit c44f08b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ Function Invoke-listStandardTemplates {
$Table = Get-CippTable -tablename 'templates'
$Filter = "PartitionKey eq 'StandardsTemplateV2'"
$Templates = (Get-CIPPAzDataTableEntity @Table -Filter $Filter) | ForEach-Object {
$JSON = $_.JSON
$JSON = $_.JSON -replace '"Action":', '"action":'
try {
$RowKey = $_.RowKey
$data = $_.JSON | ConvertFrom-Json -Depth 100 -ErrorAction SilentlyContinue
$data = $JSON | ConvertFrom-Json -Depth 100 -ErrorAction SilentlyContinue

} catch {
Write-Host "$($RowKey)"
Write-Host "$($RowKey) standard could not be loaded: $($_.Exception.Message)"
return
}
$data | Add-Member -NotePropertyName 'GUID' -NotePropertyValue $_.GUID -Force
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Invoke-CIPPStandardRetentionPolicyTag {
$StateIsCorrect = ($CurrentState.Name -eq $PolicyName) -and
($CurrentState.RetentionEnabled -eq $true) -and
($CurrentState.RetentionAction -eq 'PermanentlyDelete') -and
($CurrentState.AgeLimitForRetention -eq $Settings.AgeLimitForRetention) -and
($CurrentState.AgeLimitForRetention -eq ([timespan]::FromDays($Settings.AgeLimitForRetention))) -and
($CurrentState.Type -eq 'DeletedItems') -and
($PolicyState.RetentionPolicyTagLinks -contains $PolicyName)

Expand Down

0 comments on commit c44f08b

Please sign in to comment.