Launching Installer Via Powershell and WinRM and Nothing Happens

Posted by Nick DeMayo on Server Fault See other posts from Server Fault or by Nick DeMayo
Published on 2013-11-01T15:44:53Z Indexed on 2013/11/01 15:58 UTC
Read the original article Hit count: 400

I'm currently working on a Powershell script to run some Microsoft Hotfix installers remotely on several Windows Server 2008 R2 servers that I manage. Basically, the script copies all the appropriate files up to the server, and then runs the installer via Invoke-Command, like so:

function InstallCU {
    Write-Host "Installing June 2013 CU..."
    Invoke-Command -ComputerName $ServerName -ScriptBlock {
        Start-Process "c:\aaa\prjcusp2\ubersrvprj2010-kb2817530-fullfile-x64-glb.exe" -ArgumentList "/passive"
    }
}

If I run the "Start-Process" command locally on the server, the installer runs properly. However, when trying to run it remotely, nothing happens (actually, I can see the installer start up in Task Manager, but it closes a couple seconds later and doesn't run).

I've attempted giving the Invoke-Command -Credentials, I've turned off UAC on the server, and I've ensured that my WinRM settings (running 'winrm quickconfig' and setting TrustedHosts to *) are correct. I've also tried having the Invoke-Command script run a local Powershell script to run the installer and changing the Argument from '/passive' to 'quiet' (in case it can't remotely launch something that has a UI), but again, no dice.

Is there anything else I can try, or am I just not going to be able to do this?

© Server Fault or respective owner

Related posts about windows-server-2008-r2

Related posts about powershell