Solved

finding distribution groups/sec groups full control

Posted on 2014-09-17
3
179 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
[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 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
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…

733 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