Solved

powershell exchange

Posted on 2015-02-12
5
15 Views
Last Modified: 2016-06-23
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
Comment
Question by:techdrive
  • 2
  • 2
5 Comments
 
LVL 69

Expert Comment

by:Qlemo
ID: 40613971
Those two queries are not related, so what is it you really want to see?
0
 

Author Comment

by:techdrive
ID: 40614982
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
 
LVL 69

Expert Comment

by:Qlemo
ID: 40614989
Above should be the result if user1 has full access to those for accounts, etc.?
0
 

Accepted Solution

by:
techdrive earned 0 total points
ID: 40615012
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question