Skip to content

Commit

Permalink
add continue statement
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinTegelaar committed Jul 26, 2023
1 parent 3d66fbd commit f0278ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions UpdatePermissions/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ foreach ($Row in $Tenants ) {
if (!$CPVRows) {
Write-Output "No list available"
Push-OutputBinding -Name Msg -Value $row.customerId
continue
}

if ($Row.customerId -notin $TenantList) {
Write-Output "Not in the list: $($row.customerId)"
Push-OutputBinding -Name Msg -Value $row.customerId
continue

}

if ($CPVRows | Where-Object { $_.Tenant -eq $row.customerId } | Where-Object { $_.LastApply -EQ $null -or (Get-Date $_.LastApply).AddDays(-14) -gt $currentUTCtime }) {
Write-Output "In list, Old age."
Push-OutputBinding -Name Msg -Value $row.customerId
continue
}
}

0 comments on commit f0278ee

Please sign in to comment.