1,110 pts.
 PowerShell to create an Active Directory script
Can we use PowerShell to create a AD script to alert managers to when their subordinates log on to the network?

Software/Hardware used:
ASKED: August 9, 2011  5:58 PM
UPDATED: March 31, 2012  7:02 PM

Answer Wiki:
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.
Last Wiki Answer Submitted:  February 11, 2013  10:53 pm  by  Colin Smith   845 pts.
All Answer Wiki Contributors:  Colin Smith   845 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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 pts.