0

Solution: Ended having to enable "Turn on Script Execution" in Group Policy. Located under Administrative Templates\Windows Components\Windows Powershell. Enable policy and set your desired execution policy.

Server 2008 R2

Utilizing file screen alerts and trying to execute a powershell script but cannot get it working for some reason.

I've been trying basic 1 line scripts ( log off a session ID) and it's not working. The alerts go through, but the script is not executed.

Here's the settings:

Settings

I've tried working directory in SysWoW, C:\, System32 nothing works and everything I read says it should.

Can anyone point out what I'm doing wrong?

  • Is powershell not executing or is your script not processing what it should? What's the execution level set on this machine? What's the code of the actual script? – Colyn1337 Dec 18 '15 at 15:40
  • Are you receiving an error which you can post? – bentek Dec 18 '15 at 16:27
  • @Colyn1337 powershell is not executing. Execution level is set as unrestricted on this machine and run as System privileges. I've tried a simple 'stop-machine' or 'logoff 2' (where session ID 2 is logged in and uneffected) – Plasma Dec 19 '15 at 2:11
  • @bentek no errors, unfortunately. Nothing in event logs either, just the event for the file screen alert which does fire off, I receive the email alert but no script execution. Batch works fine though – Plasma Dec 19 '15 at 2:15
  • How do you have it set to trigger? – bentek Dec 19 '15 at 2:16
0

Solution: Ended having to enable "Turn on Script Execution" in Group Policy. Located under Administrative Templates\Windows Components\Windows Powershell. Enable policy and set your desired execution policy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.