1 Reply Latest reply on Feb 19, 2019 10:57 AM by sturdyerde

    PowerShell  action Script doesn't run




      i have created a Action Alert that execute a external Program. This execute a script that delete some file  to free space .  If i run this script locally it works fine. Just some information : the solarwindws service is running under local system. The orion server are in different domain that the destination server. the script only run some command to delete files .


      i dont know if are permission issue or i need to configure something in the script that connect to destination server  or put the credentials in the command . i read this document Execute remote process through WMI and Powershell  but still dont run .


      command that i have tested

      C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy unrestricted -command "c:\CleanUpDisk.ps1 '${NodeName}'"

      C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy unrestricted -command "c:\CleanUpDisk.ps1 '${NodeName}'"


      C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy unrestricted -NonInteractive -file "c:\CleanUpDisk.ps1"