Solved

VBScript:  Distribution List Audit

Posted on 2013-05-20
2
666 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AD Account lockout 11 62
powershell mailbox move question 8 44
Distinguished username as email address 4 40
DC with error SChannel ID 36888 3 39
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 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 …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

735 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