I want to know if it is possible to get the IP of machine, logged on user, hostname from event id 4624 using vbscript?
I want a vbscript which takes out this information:
I want to know if it is possible to get the IP of machine, logged on user, hostname from event id 4624 using vbscript?
I want a vbscript which takes out this information:
It's possible. You need to query events with the ID 4624 from the eventlog and then parse name, IP address and port out of the message string, e.g. with a regular expression:
Basically it sounds like you're looking for this article. In it, the author outlines a very thorough approach but the key bit is:
This function calls into QueryEventLog, which does the heavy lifting:
The rest is detailed in that article, but basically just concerns itself with writing the results to a file and adding some nice user interactions around the execution.