Page 1 of 1

Remote starting of sabnzbd with powershell

Posted: January 16th, 2015, 10:41 am
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*}

Re: Remote starting of sabnzbd with powershell

Posted: January 16th, 2015, 12:58 pm
by shypike
I advise to run it as a Windows service.
See: http://wiki.sabnzbd.org/sabnzbd-as-a-windows-service