Solved

finding distribution groups/sec groups full control

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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
If you troubleshoot Outlook for clients, you may want to know a bit more about the OST file before doing your next job. IMAP can cause a lot of drama if removed in the accounts without backing up.
In this video we show how to create an email address policy 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…
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…

717 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