Skip to content

Commit

Permalink
improve performance query to get count of users without advanced audi…
Browse files Browse the repository at this point in the history
…ting enabled (#1406)
  • Loading branch information
tkol2022 authored Nov 15, 2024
1 parent 5987051 commit 3d336bc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ function Export-DefenderProvider {
$DLPLicense = ConvertTo-Json $false
}

# Run commands to get count of users with Advanced auditing enabled
# Get count of users without Advanced auditing enabled
# GUID below is service plan ID for M365_ADVANCED_AUDITING as defined
# on Microsoft Licensing Reference shown here:
# https://learn.microsoft.com/en-us/entra/identity/users/licensing-service-plan-reference
$UserParameters = @{ConsistencyLevel = 'eventual'
Count = 'UsersWithoutAdvancedAuditCount'
All = $true
Top = 1
Filter = "not assignedPlans/any(a:a/servicePlanId eq 2f442157-a11c-46b9-ae5b-6e39ff4e5849 and a/capabilityStatus eq 'Enabled')"
}

Expand Down

0 comments on commit 3d336bc

Please sign in to comment.