Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
Medium Priority
?
372 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
[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
2 Comments
 
LVL 42

Accepted Solution

by:
Meir Rivkin earned 1500 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

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.
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

604 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