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
Solved

need assistance modifying this script to target all distribution groups in the enterprise, not just a single DG.

Posted on 2012-03-26
2
353 Views
Last Modified: 2012-05-07
hello, we use the following script to list DL restrictions of a single Distribution group.

how can we modify this to target all Distribution groups in a particular OU, and generate an HTML report that we can send out.

thx in advance.

/See attached script code
get-dlrestrictions.txt
0
Comment
Question by:siber1
2 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 37770325
to get all Distribution groups in a particular OU, simply pass OU path as first parameter to Get-QADGroup (line 17) and remove $DLName parameter.

for instance:
foreach ($DL in (get-QADGroup 'DC=sd-develop,DC=local' -GroupType 'Distribution' -IncludedProperties AuthOrig, UnauthOrig, dLMemRejectPerms, dLMemSubmitPerms, msExchRequireAuthToSendTo) {

//now do something with $DL ...

}

Open in new window

0
 

Expert Comment

by:mrrj
ID: 37938638
Do you have a copy of the final script you used?  I have tried to follow the solution but am getting errors about Unexpected token.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

This article outlines the process to identify and resolve account lockout in an Active Directory environment.
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

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