Welcome to MSDN Blogs Sign in | Join | Help

Oscar Calvo's Blog

Random thoughts focused on Modeling, Software Factories, Visual Studio Extensibility, Xbox 360, Windows Media and Windows MCE.

Syndication

News


How to: Run Expression Encoder 3 under PowerShell remoting

James wanned me to explain the set of steps I use to enable Convert-Media under a PowerShell remoting.

First a disclaimer: running these steps will lower the security settings of your PC, use with caution. 

Here there are:

In your encoding server (mine is called tv-server):

Enable-PSRemoting  -force # Enables remoting
set-item WSMan:\localhost\Client\TrustedHosts * -force # I am not running a domain controller, so my server needs to trust everybody
set-item wsman:localhost\Shell\MaxMemoryPerShellMB 1024 -force # The default allowed memory is very low, we need to bump it so that Convert-Media have room to work.
Enable-WSManCredSSP -Role Server -force # I need the server to have access to my Windows Home Server, so it needs to autenticate using credential delegation

In your client:

function AllowDelegation($policyName)
{
    $keyPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\"+$policyName
    if (test-path $keyPath)
    {
        rmdir $keyPath -force -rec
    }
    $key = mkdir $keyPath
    $key.SetValue("1","WSMAN/*");
}
AllowDelegation "AllowDefaultCredentials"

AllowDelegation "AllowFreshCredentials"

Enable-WSManCredSSP -Role Client -DelegateComputer * -force

In order to remote into your server do:

Enter-PSsession <ServerName> –cred <UserName>

I have used “*” (star) in two places, that’s too broad, if you are already using a DNS suffix I would recommend to use it and change “*” to “*.mydomain.com”.

In that case you need to refer to your server as:

Enter-PSsession <ServerName>.mydomain.com –cred <UserName>

Once inside, load the Encoder module as usual and execute Convert-Media.

You could Batch background encoding jobs using the instructions from the PowerShell team.

Enjoy,

 

Published Friday, November 06, 2009 7:31 PM by ocalvo

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
Page view tracker