Solved

Get Report to Manager Enabled

Posted on 2014-01-17
1
434 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
ID: 39788166
"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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
In this video we show how to create an Accepted Domain 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 >> Ac…
To show how to generate a certificate request 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 >> Certificates…

791 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