This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Alert triggering PowerShell Script

So I have a very basic PowerShell script that I have tested and ran successfully that should execute among an S/W alert.

When I set up the alert's action, and simulate it, S/W states that it "Executed Successfully", however the script is supposed to change a file over the network and it is not changed. I figure there could be a few possibilities:

1. Permissions! - My S/W instance is running under a domain account that has local admin privileges on both the server I'm accessing and the server I'm on.

2. Bad Scripting. - In all honesty, I am a very novice when it comes to PowerShell, however I have tested it running it as myself (again, permissions).

3. S/W not actually executing the script? - I've looked through the Windows Event Log and the SolarWinds logs to see either a successful execution or a failed execution, but am finding nothing.

Any and all help is appreciated.

Thank you!

EDIT---- I have drilled down to know that this is a security issue. After careful review; I am running my S/W services as Local System, which will not have access to the network shares file system.  Can I change my services to run under this domain account -- they are local admins.  Also, which service should be updated?

  • Take a look at this post I put out about running .bat/powershell as an alert action. It talks about how i had to change the service "run-as" for Orion. The link shows a .bat script but there is a link at the top that also takes you to a powershell script. Hope it helps.

    PSEXEC to start remote process

  • I believe the post chad.every referred to would do the trick. I did it a slightly different way which also would work.

    Since the alert script is being processed on the Solarwinds Orion server but being ran against another server, the server that you are running it against needs to have permissions added for the Orion server.

    Go to your remote server to where you would normally add a user into the administrators group and use the pulldown the change it to 'computers'. Enter the Orion's server name and add the Orion server into the admin group.

    Then you will be able to execute scripts remotely from Orion. 

  • Thanks, bobmarley​ & chad.every​. For simplicity sake, I added the SW server as an Admin on the Web Server.

    It worked like a charm!