Issue with powershell action scripts on WS2012/2008

I’m trying to run a powershell action script on our Windows machines to enable the print logs in the windows event viewer but I am having an issue on Windows Server 2008 an 2012 (french) machines only. It works fine 2012R2 and up.

Action summary returns this

Invalid action content: the action type is invalid.
Status
Start Time Not Executed
End Time Not Executed
Exit Code None

Here is my script that I am trying to run in a task. If I run it directly in a powershell shell on the 2008/2012 machine, it works and the windows event log gets enabled.

$printLog = New-Object System.Diagnostics.Eventing.Reader.EventLogConfiguration “Microsoft-Windows-PrintService/Operational”
$printLog.IsEnabled = $true
$printLog.SaveChanges()

I have tried to run simple “write-host” but I get the same issue.

The native PowerShell script type is only available from BigFix client 10.0.4, which is also not supported on Win2008 / Win2012.
For those you’ll need to use the old method, build a PowerShell script using ‘createfile’ and execute it with ‘wait PowerShell.exe …’

The prerelease Script Builder Dashboard at New BigFix Labs Dashboards does not depend on the new 10.0.4 native script capability and should be helpful.

2 Likes

Alright! Thanks for the quick answer. I didn’t noticed that the fixlet to update the agent to 10.0.4 isn’t relevant for 2008/2012.

1 Like