Solved

powershell exchange

Posted on 2015-02-12
5
13 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 68

Expert Comment

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

Author Comment

by:techdrive
Comment Utility
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 68

Expert Comment

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

Accepted Solution

by:
techdrive earned 0 total points
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now