PowerShell to create an Active Directory script

1,110 pts.
Tags:
Active Directory
Active Directory scripting
Network management
PowerShell
PowerShell Scripts
Can we use PowerShell to create a AD script to alert managers to when their subordinates log on to the network?
ASKED: August 9, 2011  5:58 PM
UPDATED: March 31, 2012  7:02 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I would create a logon script for your domain and you can have that script set up to send the notifications. If using Powershell V2 then you can call the send-mailmessage cmdlet in the script and pass it the values that you need. If your AD has all the attributes filled out then you should be able to pull the users managers email from AD.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • ErroneousGiant
    It is possible as AD stored the last logon time in the schema, you can access the field through ADSI edit. Your script would have to run in a loop to catch a new event so you may lose some performance on the server with a script constantly running and referencing AD.
    3,120 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following