?
Solved

finding distribution groups/sec groups full control

Posted on 2014-09-17
3
Medium Priority
?
184 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 2000 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

Bringing Advanced Authentication to the SMB Market

WatchGuard announces the acquisition of advanced authentication provider, Datablink, with one mission – to bring secure authentication to SMB, mid-market, and distributed enterprises with a cloud-based solution, ideal for resale via their established channel & MSSP community.

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
New style of hardware planning for Microsoft Exchange server.
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…
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…
Suggested Courses

752 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