Get event data from event triggered task
- Create task
- Export task into XML
- Add the following: into Task/Triggers/EventTrigger
<ValueQueries> <Value name="User">Event/EventData/Data[@Name='TargetUserName']</Value> <Value name="Computer">Event/EventData/Data[@Name='TargetDomainName']</Value> </ValueQueries>
- Reimport the task
- Use $(User) and $(Computer) as variable names