• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 23
  • Last Modified:

powershell exchange

I have these two commands that pull send as access and full acess permissions for users. I was wondering if I could have them to pull the users permissions in the format I have listed below.

Get-Mailbox  | Get-MailboxPermission | ?{($_.AccessRight s -eq "FullAccess") -and ($_.User -like 'DOMAIN\user') -and ($_.IsInherited -eq $false)}


Get-Mailbox -OrganizationalUnit "" | Get-ADPermission | ? {$_.Deny -eq $false -and $_.ExtendedRights -like "*Send-As*" -and $_.IsInherited -eq $false -and !($_.User-like "NT AUTHORITY\SELF")} | Select User,Identity,@{N="AccessRights";E={$_.AccessRights}},@{N="ExtendedRights";E={$_.ExtendedRights}}



user1

      domain\user
      domain\user1
      domain\user2
      domain\user3

user2

      domain\user
      domain\user1
      domain\user2
      domain\user3
user3

      domain\user1
      domain\user2
      domain\user3
0
techdrive
Asked:
techdrive
  • 2
  • 2
1 Solution
 
QlemoC++ DeveloperCommented:
Those two queries are not related, so what is it you really want to see?
0
 
techdriveAuthor Commented:
qlemo they are...one is for send as and the other is for full access. I am trying to pull full access for users in exchange  but I wanted this to display in the following format. I wanted the samething for send as.


user1

       domain\user
       domain\user1
       domain\user2
       domain\user3

 user2

       domain\user
       domain\user1
       domain\user2
       domain\user3
 user3

       domain\user1
       domain\user2
       domain\user3
0
 
QlemoC++ DeveloperCommented:
Above should be the result if user1 has full access to those for accounts, etc.?
0
 
techdriveAuthor Commented:
foreach ($mailboxes in Get-mailbox -resultsize:unlimited) { get-adpermission $mailboxes | ft @{expression={$_.displayname};Label=”$mailboxes”}} |export-csv

Open in new window



I think I have found the solution. At least this works in distribution groups http://oxfordsbsguy.com/2014/04/21/exchange-powershell-how-to-enumerate-distribution-lists-managers-and-members/ next to the last at the bottom. It lists the groups and then the members. I was trying to list the mailbox and then who what full access are assigned to that mailbox.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now