need a powershell script to send an email to the user added to a security group in AD

can someone provide a powershell script that will generate an email to the user that is added to a security group in Active Directory.

i.e. john smith is added to ADSecGroup and an email is auto-generated to the user that was added to the group.

thx in advance.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Phil DavidsonCommented:
The automated nature of invoking the request will require numerous adjustments.  I don't have a Development QA server at my disposal.  But I will refer you to this link which should help you get started:
siber1Author Commented:
thx but I have already seen that link, the key here is to have the users that are added to the group to receive the automated email. if anyone else has a way to do this, look forward to hearing our solution.
You won't be able to monitor AD changes in the same way you'd monitor file system changes, however here are a few ideas:

1. Enable auditing, and set a SACL on that group for write access. Events are recorded in the security logs, and you periodically check for the related event.

2. Record a snapshot of members, then periodically check the membership, comparing to your last snapshot.

3. Limit access for adding users to a select account. Develop an interface which runs under an admin-level account to perform the add, then have said application submit your email. is a good source for the first option. could be tweaked for the second.
The third would be a good bit more design and involvement, and most don't want to limit their environment this way.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
siber1Author Commented:
thanks I'll try that approach.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.