none
Powershell report for OWA enabled mailboxes, with department and manager. RRS feed

Answers

  • Hi JoeGSH,

    The reason why Department and Manager won't display is because they are no mail-related properties which can only be viewed using the command Get-User.

    You can have a try at the following command to get the report for OWA enabled mailboxes, with department and manager.

    Import-Module "ActiveDirectory"
    
    $mailboxes = Get-CASMailbox | where { $_.OWAEnabled }
    foreach ($m in $mailboxes) {
        $a = Get-User $m.DistinguishedName 
        "{0};{1};{2};{3}" -f $m.DisplayName,$m.OWAEnabled,$a.Department,$a.manager  
    }  

    Regards,

    Beverly Gao


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Friday, November 8, 2019 7:41 AM

All replies

  • Thursday, November 7, 2019 11:42 PM
  • Hi JoeGSH,

    The reason why Department and Manager won't display is because they are no mail-related properties which can only be viewed using the command Get-User.

    You can have a try at the following command to get the report for OWA enabled mailboxes, with department and manager.

    Import-Module "ActiveDirectory"
    
    $mailboxes = Get-CASMailbox | where { $_.OWAEnabled }
    foreach ($m in $mailboxes) {
        $a = Get-User $m.DistinguishedName 
        "{0};{1};{2};{3}" -f $m.DisplayName,$m.OWAEnabled,$a.Department,$a.manager  
    }  

    Regards,

    Beverly Gao


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Friday, November 8, 2019 7:41 AM
  • Hi JoeGSH,

    I am writing here to confirm with you how the thing going now?

    If you need further help, please provide more detailed information, so that we can give more appropriate suggestions.

    Regards,

    Beverly Gao


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Wednesday, November 13, 2019 9:41 AM