Hi all,
First of all, thanks for reading. I'm trying to capture a certain event within Windows
Server 2008 and fire off a script, passing a variable to that script.
The event I'm trying to catch is user creation in Active Directory. When a user is created a script is invoked and the username of the newly created user is passed as an argument to the script.
This is what I have in my custom event filter:
<QueryList>
<Query Id="0" Path="Security">
<Select Path="Security">*[System[(EventID=4722)] and EventData[(Data[@Name="TargetUserName"])]]</Select>
</Query>
</QueryList>
I have "start a program" selected in the Actions which will start my script and I have "TargetUserName" defined in the "Add arguments" textbox.
I must be doing something wrong as my script is not receiving any argument at all. (I have of coursed checked my script by manually running it and it all works fine).
Any help would be very much appreciated. Thanks in advance.
First of all, thanks for reading. I'm trying to capture a certain event within Windows
Server 2008 and fire off a script, passing a variable to that script.
The event I'm trying to catch is user creation in Active Directory. When a user is created a script is invoked and the username of the newly created user is passed as an argument to the script.
This is what I have in my custom event filter:
<QueryList>
<Query Id="0" Path="Security">
<Select Path="Security">*[System[(EventID=4722)] and EventData[(Data[@Name="TargetUserName"])]]</Select>
</Query>
</QueryList>
I have "start a program" selected in the Actions which will start my script and I have "TargetUserName" defined in the "Add arguments" textbox.
I must be doing something wrong as my script is not receiving any argument at all. (I have of coursed checked my script by manually running it and it all works fine).
Any help would be very much appreciated. Thanks in advance.