This project has moved and is read-only. For the latest updates, please go here.

Researching running WTV-MetaRenamer on remote machine

Topics: question
Jul 27, 2012 at 2:30 PM

Can WTV-MetaRenamer existing in a folder on a remote machine be executed from another machine.

I have several 7MC machines recording TV shows. In the public Recorded TV of both machines I have placed the files and folders that make up WTV-MetaRenamer. It works perfectly on both.

I would like to start the powershell on the remote machine somehow.

Why am I doing this? For unprotected shows I'm using VideoReDo and VAP. I copy the recorded TV from the 2nd machine into the VAP monitored folder on the 1st machine and analyze for commercial breaks, edit the cuts, save and rename them and then move them to a main Recorded TV folder on WHS that any machine can use to watch the show.

For protected files I just want to rename them and then I place them in WHS folders dedicated to the machine that created the protected show:

WHS\Protected TV Computer1
WHS\Protected TV Computer2



Jul 28, 2012 at 9:50 AM

Let me see if I've understood what you are trying to do.

You've got two computers, each of which are recording programmes, and you want to run WTV-MetaRenamer on each of them to cause the protected files to be renamed & moved to your WHS server.

You want to be able to *remotely* initiate that running of the script.

Is that correct?

If it is, the answer lies with Windows PowerShell Remoting. This allows you to start an interactive session with a remote computer:

enter-pssession computer1

You then run WTV-MetaRenamer as you would normally enter the command; the interactive session automatically causes the script to execute directly on computer 1. When it has finished, you end the interactive session with:


The benefit of this approach is that you can run WTV-MetaRenamer in -interactive mode so that you can select the episodes that the script cannot match properly. However, if the script is set up so that you are happy for it to run without you having interaction with the script itself, you can cause the script to run on both computers at the same time with:

invoke-command -computername computer1,computer2 -filepath c:\<where you put WTV-MetaRenamer>\WTV-MetaRenamer.ps1

I haven't tried this, though, so I'm only going off Microsoft's documentation (linked below) and assuming that the script will pick everything up correctly. I don't see a reason why it wouldn't but if you can't get it to work, please feel free to report back.

Jul 28, 2012 at 4:33 PM

Hi Patrick,

Thanks for the info - I have to sort out winrm.cmd on the remote first to add the first computer as trusted host on the second (the remote) but this looks like it should work. I'll follow up with the steps. I have to wait for people to stop watching TV on the remote, BTW that's why I'm bothering with all this so I can perform the renaming on the remote while people are using Media Center.

I did come up with a workflow if this doesn't work which is copying the remote's protected files to a designated folder on the second machine, run WTV-MetaRenamer.ps1 in that local folder and then copy them off to the WHS.