This script will provide you the details about the,
1. "Current Logged in User"
2. "Last Logged on user "
Note:
1.Please run the script using the option "Run as Administrator" Via ITSM.
2.The Timestamp displayed in the DateTime Format (YYYYMMDDHHMMSS).