[Solved] Looking for Export two report in one powershell Get-Mailbox | Get-mailboxpermission


Try this:

Import-csv c:\test1.csv | ForEach-Object { 
    $MailBox = Get-Mailbox -Identity $_.Name
    $Permission = ($MailBox | Get-MailboxPermission -User "[email protected]").AccessRights

    $Properties = @{
        Name = $MailBox.DisplayName
        Email = $MailBox.PrimarySmtpAddress
        Permissions = $Permission
    }
    New-Object -TypeName PSObject -Property $Properties
}

1

solved Looking for Export two report in one powershell Get-Mailbox | Get-mailboxpermission