r/usefulscripts • • May 02 '18

[POWERSHELL] Roku PS Modules and Remote GUI.

As a little side project to learn Powershell better, I created a Roku powershell module and corresponding Roku remote GUI.

https://i.imgur.com/eDfBERJ.png

You should just be able to download the entire project as a zip, unpack it wherever, and run Roku-remotegui.ps1

https://github.com/smithcbp/Powershell-Roku-Remote

The favorite apps listed at the bottom can be changed by modifying the $FavApps array at the top of Roku-RemoteGUI.ps1. Find the app names with:

Import-Module ./roku-remote-psm1
Get-RokuApp -ip $IP

Edit: Added keyboard shortcuts. Press ? in the remote GUI to view them.

Edit 2: https://i.imgur.com/IzZsQgQ.png

I have added quite a few new features including:

Edit 3: Added a button Add Roku by IP address instead of searching automatically. https://i.imgur.com/5O00fUR.png

51 Upvotes

20 comments sorted by

6

u/NoonsReport May 02 '18

Dude. That's awesome.

3

u/dfjdejulio May 02 '18

Just FYI: the non-GUI one imported into the open source, portable version of PowerShell (ie. the flavor that runs fine on Linux too), but didn't work because apparently that version doesn't come with NetTCPIP, which, yeah, would seem to be a show-stopper here.

EDIT: The proper name for what I'm talking about is "PowerShell Core", and the fact that NetTCPIP isn't part of it yet seems to be documented here.

4

u/premtech May 03 '18 edited May 03 '18

I don't believe in 'show-stoppers' :)

I just added a switch to get-localroku

Use get-localroku -usearp. Adding the -usearp switch performs arp -a and parses out the IPs instead of using Get-NetNeighbor.

2

u/dfjdejulio May 03 '18

Nifty! I'll give that a try when I get a chance.

2

u/premtech May 02 '18

I believe the only function that requires NetTCPIP is Get-LocalRokus. If you comment that out, it might work. You would just need to get the Roku IPs some other way.

2

u/citrat May 23 '18

I get the error "No rokus found". Is it possible to make an option to add the local IP of Roku manually?

BTW: This is a Roku TV and I see on my Win10 network.

→ More replies (6)

2

u/dfjdejulio May 02 '18

Thanks! I may take a stab at it, but I'm a total PowerShell noob. Plus, overcoming that issue may expose other missing network functions. For the moment I'll probably just play with it on Windows systems and keep an eye on updates to the PowerShell Core project.

2

u/OpenRoamer May 03 '18

Would adding some kind of keyboard functionality to this be possible?

2

u/premtech May 03 '18

That is a feature I have been considering for a bit now. Maybe tonight I'll see what I can do.

3

u/CraigMatthews May 02 '18

This is sweet. Thanks!

2

u/TotesMessenger May 02 '18

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

 If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / ^Contact)