Solved

Get Report to Manager Enabled

Posted on 2014-01-17
1
401 Views
Last Modified: 2014-01-22
Hi experts,

Was wondering if I could have some help with a one liner PS script that I used to get the Required Sender Authentication disabled. The script I have is:

Get-DistributionGroup -ResultSize Unlimited | ? {$_.RequireSenderAuthenticationEnabled -eq $false} | select Name,GroupType,PrimarySMTPAddress | Export-Csv c:\filename

Now what I would like to find out in addition is whether the Report to manager option is enabled as well... and by whom,I tried this..

Get-DistributionGroup -ResultSize Unlimited | ? {$_.RequireSenderAuthenticationEnabled -eq $false} | select Name,GroupType,PrimarySMTPAddress |  {$_.ReportToManagerEnabled -eq $false} | Export-Csv C:\filename

though this does not work. Could someone have a look and help me sort this little script out?

Many thanks.
17-01-2014-09-44-09.png
0
Comment
Question by:damejen
1 Comment
 
LVL 53

Accepted Solution

by:
Will Szymkowski earned 500 total points
Comment Utility
"ReportToManagerEnabled" is not an attribute which is why it is not working... Use the below syntax below to accomplish this...

The Property that you are looking for is an AD Property AccessRights is WriteProperty and Property is Member.

The command needs to be separate from your previous one as they are different cmdlets...

get-distributionGroup -ResultSize "unlimited" | Get-ADPermission | ? {$_.AccessRights -like "*Write*" -and $_.Properties -like "*member*" -and $_.User -notlike "domain\*Exchange*"} | Select Identity, accessrights, properties,user

Open in new window


The above command will get all distribution groups, pipe to get-adpermission and only find objects that have AccessRights like Write as part of the vaule and have Properties like Member and not like any object that starts with Exchange, which will remove any results from Exchange Groups that have this access.

Make sure that you change "-notlike "domain\*Exchange*" to "yourdomain\*Exchange*.

Will.
0

Featured Post

The curse of the end user strikes again      

You’ve updated all your end user’s email signatures. Hooray! But guess what? They’re playing around with the HTML, adding stupid taglines and ruining the imagery. Find out how you can save your signatures from end users today.

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create an Address List 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 Organization >> Ad…
To show how to create a transport rule 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 Mail Flow >> Rules tab.:  To cr…

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

6 Experts available now in Live!

Get 1:1 Help Now