Solved

VBScript:  Distribution List Audit

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
WriteBack Attribute permission on domain level 13 57
Add LDAP custom Attribute to Exchange GAL 2010 2 36
AD Cleanup by EmployeeID 11 43
How can i open a .fxp file 3 29
Resolve DNS query failed errors for Exchange
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

815 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

11 Experts available now in Live!

Get 1:1 Help Now