Hello,
First, let me say that your Powershell scripts are really good and super helpful 🐱
I am actually deploying PSWinReportingV2 in our AD in order to get AD changes report each morning. It is working great and I am able to get an email containing the summary with a dynamic HTML attached.
I noticed that the Group Policy changes was always empty. After some digging, I found out that I need to enable the audit for GPO changes (5136).
Now I can get the list of GPO changed in the report!
However, in the report, the changed GPOs are listed by their GUID only.
This is hard to get a quick understanding of which GPO was impacted, and also to find the real GPO.
I would love to be able to also get their name along with the GUID.
I noticed that the event definition has a Functions parameter that can apply a function to a specific field (here is an example).
My though was to provide a new function on the ObjectGuid field that hook up GPOZaurr to find the GPO with the GUID and return the real name.
Sadly, looking at the code behind it, I found out that the functions are hard-coded so I can't do this.
So to get to the proposal: I think it would be great if the user could provide a custom function that is automatically called.
The user could simply pass a script block or a function (using $FUNCTION:myCustomFn), and internally the script would do
$EventProperty.Value = Invoke-Command -ScriptBlock $EventsDefinition.Functions[$EventProperty.Name] -ArgumentList @($EventProperty.Value, $Event)
Notice the args list that pass the field value, and also the whole event (if needed).
Thank you and have a nice day!
Hello,
First, let me say that your Powershell scripts are really good and super helpful 🐱
I am actually deploying PSWinReportingV2 in our AD in order to get AD changes report each morning. It is working great and I am able to get an email containing the summary with a dynamic HTML attached.
I noticed that the Group Policy changes was always empty. After some digging, I found out that I need to enable the audit for GPO changes (5136).
Now I can get the list of GPO changed in the report!
However, in the report, the changed GPOs are listed by their GUID only.
This is hard to get a quick understanding of which GPO was impacted, and also to find the real GPO.
I would love to be able to also get their name along with the GUID.
I noticed that the event definition has a Functions parameter that can apply a function to a specific field (here is an example).
My though was to provide a new function on the ObjectGuid field that hook up GPOZaurr to find the GPO with the GUID and return the real name.
Sadly, looking at the code behind it, I found out that the functions are hard-coded so I can't do this.
So to get to the proposal: I think it would be great if the user could provide a custom function that is automatically called.
The user could simply pass a script block or a function (using
$FUNCTION:myCustomFn), and internally the script would doNotice the args list that pass the field value, and also the whole event (if needed).
Thank you and have a nice day!