diff --git a/source/tests/Test-MailboxAuditingE3.ps1 b/source/tests/Test-MailboxAuditingE3.ps1 index 8ae5b19..d7c699a 100644 --- a/source/tests/Test-MailboxAuditingE3.ps1 +++ b/source/tests/Test-MailboxAuditingE3.ps1 @@ -43,7 +43,7 @@ function Test-MailboxAuditingE3 { process { - if ($null -ne $founde3Sku) { + if (($founde3Sku.count)-ne 0) { $allUsers = Get-MgUser -Filter "assignedLicenses/any(x:x/skuId eq $($founde3Sku.SkuId) )" -All $mailboxes = Get-EXOMailbox -PropertySets Audit try { diff --git a/source/tests/Test-MailboxAuditingE5.ps1 b/source/tests/Test-MailboxAuditingE5.ps1 index e9e6852..a332baf 100644 --- a/source/tests/Test-MailboxAuditingE5.ps1 +++ b/source/tests/Test-MailboxAuditingE5.ps1 @@ -40,7 +40,7 @@ function Test-MailboxAuditingE5 { } process { - if ($null -ne $founde5Sku) { + if (($founde5Sku.count) -ne 0) { $allUsers = Get-MgUser -Filter "assignedLicenses/any(x:x/skuId eq $($founde5Sku.SkuId) )" -All $mailboxes = Get-EXOMailbox -PropertySets Audit try {