Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

shared Mailboxes full report

Posted on 2010-09-02
4
Medium Priority
?
1,298 Views
Last Modified: 2012-05-10
Hello,

I need to report detailed statistics from shared mailboxes on Exchange 07.
I tried to use get-mailboxpermission command but I can't filter all columns.

The final csv file should  include these properties: Mailbox_Name,WhenCreated,  Mailbox_smtp_address,RequireSenderAuthenticationEnabled (Yes/No),  HiddenFromAddressListsEnabled (Yes/No), Mailbox_database, ProhibitSendQuota
Prohibit_Send_Quota,Prohibit_Receive_Quota,IssueWarningQuota,  ,ManagedBy,Notes,Full_Access (users samaccountname),Send_As(users samaccountname),User_Account_Is_Blocked (Yes/No),Accept_Messages_from

I suppose that it wouldn't be an easy work to write such script because i don't know that all properties are available.
0
Comment
Question by:pi01162
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 71

Expert Comment

by:Chris Dent
ID: 33586558

This gets us near to that. Anything missing?

You may have to clarify on what you mean by Accout_Is_Blocked and ManagedBy.

Chris
Get-Mailbox | ForEach-Object {
  $Stats = Get-MailboxStatistics $_.DistinguishedName

  $_ | Select-Object Name, WhenCreated, PrimarySmtpAddress, RequireSenderAuthenticationEnabled,
    HiddenFromAddressListsEnabled, Database, ProhibitSendQuota, ProhibitSendReceiveQuota, IssueWarningQuota,
    AcceptMessagesOnlyFrom, AcceptMessagesOnlyFromDLMembers, RejectMessagesFrom, RejectMessagesFromDLMembers,
    @{n='FullAccess';e={ 
      Get-MailboxPermission $_.DistinguishedName | 
        Where-Object { !$_.IsInherited -And $_.AccessRights -Match 'FullAccess' -And $_.User -NotMatch 'SELF' } |
        ForEach-Object { $_.User } }},
    @{n='SendAs';e={
      Get-ADPermission $_.DistinguishedName |
        Where-Object { !$_.Inherited -And $_.Rights -Match 'Send-As' } |
        ForEach-Object { $_.User } }}
}

Open in new window

0
 

Author Comment

by:pi01162
ID: 33596158
First thanks for reply!
ManagedBy (Shared mailbox manager) and Account_Is_Blocked (user's account is blocked in ActiveDirectory)
0
 

Author Comment

by:pi01162
ID: 33609690
Helo,

I tested this script and almost works except Send-As permission.
The script doesn't display those permissions. Full Acces is ok.

So please look again at Your's script and check "Send-As"

P.s Also I add manager field at the end
Get-Mailbox -organizationalunit 'domain.corp/Mailboxes' -id | ForEach-Object {

  $Stats = Get-MailboxStatistics $_.DistinguishedName

  $_ | Select-Object Name, WhenCreated, PrimarySmtpAddress, RequireSenderAuthenticationEnabled,
    HiddenFromAddressListsEnabled, Database, ProhibitSendQuota, ProhibitSendReceiveQuota, IssueWarningQuota,
    AcceptMessagesOnlyFrom, AcceptMessagesOnlyFromDLMembers, RejectMessagesFrom, RejectMessagesFromDLMembers,
    @{n='FullAccess';e={ 
      Get-MailboxPermission $_.DistinguishedName | 
        Where-Object { !$_.IsInherited -And $_.AccessRights -Match 'FullAccess' -And $_.User -NotMatch 'SELF' } |
        ForEach-Object { $_.User } }},
    @{n='SendAs';e={
      Get-AdPermission $_.DistinguishedName |
        Where-Object { !$_.Inherited -And $_.Rights -Match 'Send-As' } |
        ForEach-Object { $_.User } }},

    @{n='Manager';e={Get-User $_.DistinguishedName | select}}

}

Open in new window

0
 

Accepted Solution

by:
pi01162 earned 0 total points
ID: 33615278
Helo,
I correct the script (send-as permissions), the final version beneath
Get-Mailbox -OrganizationalUnit 'domain.corp/Mailboxes' | ForEach-Object {

  $Stats = Get-MailboxStatistics $_.DistinguishedName

  $_ | Select-Object Name, WhenCreated, PrimarySmtpAddress, RequireSenderAuthenticationEnabled,
    HiddenFromAddressListsEnabled, Database, ProhibitSendQuota, ProhibitSendReceiveQuota, IssueWarningQuota,
    @{Name="AcceptMessagesOnlyFrom";Expression={$_.AcceptMessagesOnlyFrom}}, @{Name="AcceptMessagesOnlyFromDLMembers";Expression={$_.AcceptMessagesOnlyFromDLMembers}}, @{Name="RejectMessagesFrom";Expression={$_.RejectMessagesFrom}},@{Name="RejectMessagesFromDLMembers";Expression={$_.RejectMessagesFromDLMembers}} ,
    @{n='FullAccess';e={ 
      Get-MailboxPermission $_.DistinguishedName | 
        Where-Object { !$_.IsInherited -And $_.AccessRights -Match 'FullAccess' -And $_.User -NotMatch 'SELF' } |
        ForEach-Object { $_.User } }},
    @{n='SendAs';e={
      Get-ADPermission $_.DistinguishedName |
        Where-Object { $_.ExtendedRights -like 'Send-As' -and  $_.User -NotMatch 'SELF'} |
        ForEach-Object { $_.User } }},
		
		@{n='Manager';e={Get-User $_.DistinguishedName | select}}
} |Export-Csv c:\MailboxfullReport.csv -NoTypeInformation

Open in new window

0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

609 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