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
350 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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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 …

728 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

9 Experts available now in Live!

Get 1:1 Help Now