Arguments are no longer supported for custom scripts

Sonarr version (exact version): 3.0.1.526
Mono version (if Sonarr is not running on Windows):
OS: Windows 10 Home 1809

So how do I execute a powershell script?

Existing scripts are unaffected, the goal will be to allow them to be run without arguments, though we’ll have to see exactly what that entails.

Entering the path of the powershell script directy gives this error:

The specified executable is not a valid application for this OS platform.

Previously I had the powershell executable in the path and the script in the arguments but that stopped working.

Using a cmd script which runs the powershell script is working.

Should be fixed in the latest build.

Hey Guys -

Same Issue here. I had the below path followed by the arguments below it:
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell.exe
-ExecutionPolicy Bypass -WindowStyle hidden -file “C:\Scripts\Sonarr-PlexUpdate.ps1”

I tried simply moving the arguments to the end of the path string, but was told it was an invalid path. I would use a batch file which I’m sure would execute the script, but not sure if variables will pass. Finally, I just set the path to the full path of the PS1 itself which passed testing so will see what happens.

What’s the suggested method for executing a PS1 while passing Sonarr variables to it?

Thanks

This is the correct way and was the point of the fix I linked above.

I’m unable to get Sonarr (2.0.0.5338) to execute a PowerShell script :frowning:

Testing succeeds whether I try:

  1. Path as a direct path to a .ps1 file
  2. Path as a direct path to powershell.exe with ‘-File ‘c:\path\to\script.ps1’’ in the args
  3. Path as a direct path to a cmd/bat file that calls a PowerShell script.

The script writes a text file to a folder on disk (no special permissions required) but simply doesn’t appear when ‘testing’ from Sonarr. There’s a sleep in the script also, but no additional instance of PowerShell.exe starts up.

Any ideas?

Ok, full path to a .PS1 file works with Sonarr v3 beta.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.