Skip to content

Commit e45b151

Browse files
move write host
1 parent 4eec27d commit e45b151

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/CIPPCore/Public/Entrypoints/Push-CIPPAlertAppSecretExpiry.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ function Push-CIPPAlertAppSecretExpiry {
77
)
88
$LastRunTable = Get-CIPPTable -Table AlertLastRun
99

10-
Write-Host "Checking app expire for $($QueueItem.tenant)"
10+
1111
try {
1212
$Filter = "RowKey eq 'AppSecretExpiry' and PartitionKey eq '{0}'" -f $QueueItem.tenantid
1313
$LastRun = Get-CIPPAzDataTableEntity @LastRunTable -Filter $Filter
1414
$Yesterday = (Get-Date).AddDays(-1)
1515
if (-not $LastRun.Timestamp.DateTime -or ($LastRun.Timestamp.DateTime -le $Yesterday)) {
16+
Write-Host "Checking app expire for $($QueueItem.tenant)"
1617
New-GraphGetRequest -uri "https://graph.microsoft.com/beta/applications?`$select=appId,displayName,passwordCredentials" -tenantid $QueueItem.tenant | ForEach-Object {
1718
foreach ($App in $_) {
1819
Write-Host "checking $($App.displayName)"

0 commit comments

Comments
 (0)