Skip to content

Commit ec101ef

Browse files
authored
Check accountEnabled property for shared mailbox user
Apparently, I removed this a while ago while doing some other stuff...
1 parent ab15097 commit ec101ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Email-Exchange/Reports/Invoke-ListSharedMailboxAccountEnabled.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function Invoke-ListSharedMailboxAccountEnabled {
1919
# Match the User
2020
$User = $AllUsersInfo | Where-Object { $_.userPrincipalName -eq $SharedMailbox.userPrincipalName } | Select-Object -First 1
2121

22-
if ($User) {
22+
if ($User.accountEnabled) {
2323
# Return all shared mailboxes with license information
2424
[PSCustomObject]@{
2525
UserPrincipalName = $User.userPrincipalName

0 commit comments

Comments
 (0)