Remote starting of sabnzbd with powershell

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
B1G_WH1T3
Newbie
Newbie
Posts: 1
Joined: January 16th, 2015, 10:37 am

Remote starting of sabnzbd with powershell

Post by B1G_WH1T3 »

Good Day folks

So I started to try and automate my home server when we have a power failure or some sort so I don't have to login to the server to start sabnzbd and sickbeard.

now I made this power shell script to start everything but sabnzbd does start the exe but it stays on 20mb memory and does not allow me to connect to the GUI, I got around this issue with using sabnzbd-console.exe but what I noticed now it does not stay open very long max about an hour. so my real question is, can I execute sabnzbd.exe from powershell and let it actually work, I can run the exe from the desktop and it works but I can't execute the exe via powershell.

Any help would be appreciated

my script :

#variables
$user = "media-home\Administrator"
$password = cat C:\Users\Wybrand\Desktop\Scripts\Passwords\password.txt |ConvertTo-SecureString
$cred = new-object -typename System.Management.Automation.PSCredential -ArgumentList $user, $password
$s = New-PSSession -ComputerName "media-home" -cred $cred

Start-sleep -s 2

#Start sickbeard

Invoke-Command -Session $s -ScriptBlock {Start-Process -FilePath C:\SickBeard-Newshost-0.2.4-win32-alpha-build-499\SickBeard.exe}

Start-sleep -s 5

#Start Sabnzb

Invoke-Command -Session $s -ScriptBlock{Start-Process -FilePath "C:\Program Files (x86)\SABnzbd\SABnzbd.exe -p"}

Start-sleep -s 10

Invoke-Command -Session $s -ScriptBlock{Get-Process sickbeard*,sabnzbd*}
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Remote starting of sabnzbd with powershell

Post by shypike »

I advise to run it as a Windows service.
See: http://wiki.sabnzbd.org/sabnzbd-as-a-windows-service
Post Reply