Solved

VBScript:  Distribution List Audit

Posted on 2013-05-20
2
663 Views
Last Modified: 2013-06-11
Curious if anyone has in their script repository a script that will query AD and audit  and report (.csv file ) on any new Distribution List that were created during a set period of time.  In my case, the prior week.  The report would need to include:

- Distribution List Created
- Members Count, information for that Distribution List.

and any other helpful info you could throw in.  : )

Thanks a million in advance!
0
Comment
Question by:itsmevic
2 Comments
 
LVL 23

Expert Comment

by:Malli Boppe
ID: 39183527
I Have used the attached script to dump information about the all groups in the domain.
All-Groups-with-GroupMembers.vbs
0
 
LVL 42

Accepted Solution

by:
sedgwick earned 500 total points
ID: 39183652
you can have task scheduler which runs script once a week and output all new Distribution List Created, Members Count and information for that Distribution List:
here's a powersehll script which do the job:
cls
$week = (Get-Date).AddDays(-7)
Get-ADGroup -filter {GroupCategory -eq "Distribution"} -properties whencreated | 
where { $_.whenCreated -ge $week } | 
select-object Name,whenCreated,DistinguishedName, @{Name="Members Count";Expression={@(Get-ADGroupMember $_).Count}} | Export-Csv c:\temp\1.csv -NoTypeInformation

Open in new window


to run it once a week, run the following command:
SCHTASKS /Create /SC weekly /TN DistributionListAudit /ST 00:00 /TR "powersehll c:\scripts.DistributionListAudit.ps1"

Open in new window

change the script name and location to the place u saved the script.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

930 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

10 Experts available now in Live!

Get 1:1 Help Now