Solved

finding distribution groups/sec groups full control

Posted on 2014-09-17
3
174 Views
Last Modified: 2014-09-19
get-distributiongroup -organizationalunit  "CN=marketing,CN=Users,DC=contoso,DC=com" | get-adpermission | where { ($_.accessrights -match 'write' ) -or ($_.AccessRights -eq 'GenericAll')

I have a script where I am trying to pull all groups with full control permissions and then add them as owners to those same distribution groups/security groups. If someone can show me first how to pull all the groups with full control as multi valued objects then I think I can get around using the set-distribution group as reading them back in.
0
Comment
Question by:techdrive
3 Comments
 
LVL 12

Accepted Solution

by:
SreRaj earned 500 total points
ID: 40329927
Hi,

Please try following command.

get-distributiongroup -organizationalunit  "OU=marketing,OU=Users,DC=contoso,DC=com" | get-adpermission | where { $_.accessrights -match 'write' -or $_.AccessRights -match 'GenericAll' -and $_.user -notlike '*exchange*' -and $_.user -notlike '*system*' -and $_.user -notlike 's-1*' -and $_.user -notlike '*admins*' -and $_.user -notlike '*organization*' -and $_.user -notlike '*self*' -and $_.user -notlike '*administrators*' } | select identity,user,accessrights

This does not give result as multi-valued attribute, but it gives as a list. Also, please check the distinguished name for OU. Names of OU, you have to prefix with 'OU' not with 'CN'.
0
 

Author Comment

by:techdrive
ID: 40330475
thank you and what if I wanted to append a group to this. Meaning while I am looking for groups with full control add another group with full control and or access to managedby.
0
 
LVL 3

Expert Comment

by:Phil Bossman
ID: 40331846
This TechNet article shows how to add and remove sinlge entries to a DistributionGroup

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

759 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

13 Experts available now in Live!

Get 1:1 Help Now