fix: error handling for 6.1.2/6.1.3

This commit is contained in:
DrIOS
2024-06-14 10:44:53 -05:00
parent c9940c2a09
commit 9a7de2f549
2 changed files with 2 additions and 2 deletions

View File

@@ -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 {

View File

@@ -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 {