Kaseya Community

Run powershell command or script via agent procedure

This question is not answered
problem kaseya.JPG

I'm relatively new to VSA. I tried to run powershell command and script via agent procedure but without success. I'm now trying with very simple command just to test but not luck here..

I tried with stop-process -processname notepad

Tried -executionpolicy bypass stop-process -processname notepad. 

I was executing this as a system. Tried with as a user as well.

All Replies
  • Script to run PowerShell on Client.png

    I've attached a screenshot of a Kaseya script I created.  It runs a PowerShell script that is stored on a  Kaseya client

  • What do the Agent Procedure logs show for that machine.

  • Typically I use writeTextToFile to create the ps1 in their agent temp directory, then execute, then delete it. This isn't a direct answer, but it also allows you to just disable the execute and delete steps to write it to a computer to validate everything is working properly before you run it.

  • Jonathan, log show no errors. It is working now. I used all combinations in one AP (as system, as a user, x64,x86). Timmie41116 you are right. I tested it today and it works without problem. Good tip to delete that script after execution :)..

    Thank you guys