File tree Expand file tree Collapse file tree
Modules/CIPPCore/Public/Standards Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,10 +52,12 @@ function Invoke-CIPPStandardRetentionPolicyTag {
5252 return
5353 }
5454
55+ $CurrentAgeLimitForRetention = ([timespan ]$CurrentState.AgeLimitForRetention ).TotalDays
56+
5557 $StateIsCorrect = ($CurrentState.Name -eq $PolicyName ) -and
5658 ($CurrentState.RetentionEnabled -eq $true ) -and
5759 ($CurrentState.RetentionAction -eq ' PermanentlyDelete' ) -and
58- ($CurrentState .AgeLimitForRetention -eq ([ timespan ]::FromDays( $Settings.AgeLimitForRetention )) ) -and
60+ ($CurrentAgeLimitForRetention -eq $Settings.AgeLimitForRetention ) -and
5961 ($CurrentState.Type -eq ' DeletedItems' ) -and
6062 ($PolicyState.RetentionPolicyTagLinks -contains $PolicyName )
6163
@@ -125,7 +127,7 @@ function Invoke-CIPPStandardRetentionPolicyTag {
125127 $CurrentValue = @ {
126128 retentionEnabled = $CurrentState.RetentionEnabled
127129 retentionAction = $CurrentState.RetentionAction
128- ageLimitForRetention = $CurrentState .AgeLimitForRetention.TotalDays
130+ ageLimitForRetention = $CurrentAgeLimitForRetention
129131 type = $CurrentState.Type
130132 policyTagLinked = $PolicyState.RetentionPolicyTagLinks -contains $PolicyName
131133
You can’t perform that action at this time.
0 commit comments