I have an .exe I would like to install on a large farm of Windows Server 2008 computers. I am attempting to use Powershell remoting. I have this command which works locally:

invoke-command {& "N:\Temp\fortify_installer\HP-Fortify-3.20-Analyzers_and_Apps-Windows-x86.exe /s /f1N:\Temp\fortify_installer\response.iss"}

But when I add the -computername flag it seems to go off to nowhere, and the installer is never run on the remote machine.

I can launch notepad.exe via the same command and it runs. Does it have something to do with it being an installer, or something else? I realize many versions of this question have been asked and I have read them, but I am still confused as to why this doesn't work.

link|improve this question
Maybe the remote computer doesn't have an 'N:' drive? – rene Dec 28 '11 at 16:35
it does. Thanks – Bernie Dec 28 '11 at 18:20
also the notepad.exe works remotely? What happens when you invoke-command -computername server1 "cmd /c dir N:\temp* > c:\windows\temp\remote.lst"? Do you have a remote.lst file on server1 which list the files on N:? Is N: a network drive htat gets mapped during logon? – rene Dec 28 '11 at 18:27
N is a local partition, not a network drive. That command didn't work for me from the console. Didn't like the wildcard, then when I removed it said only script files are acceptable for filepath parameter, which was not even in the command.... – Bernie Dec 28 '11 at 18:47
I don't see anything parameters to the installer telling it to install non-interactively. Are you sure this thing is not trying to popup some kind of interactive window on the remote machine? The remote powershell server process is non-interactive. When you run it without -computer, it is using your local interactive session. – x0n Dec 29 '11 at 3:58
show 1 more comment
feedback

migrated from stackoverflow.com Dec 30 '11 at 16:09

This question came from our site for professional and enthusiast programmers.

1 Answer

The invoke-command requires the remote computer to be configured for remote management. Running Remote Commands

If you are unable to configure remote management you could use Windows Management Instrumentation (WMI) for the remote execution. Execute program on remote computer using PowerShell

link|improve this answer
I think I have Remote Management configured on all computers. I am able to use invoke-command to do other stuff...Thanks! – Bernie Dec 28 '11 at 17:58
Is your command structure? Invoke-command -Computername Server01 -Scriptblock {& "N:\Temp\fortify installer\HP-Fortify-3.20-Analyzers_and_Apps-Windows-x86.exe"} – jmh6182 Dec 28 '11 at 18:34
I don't have -ScriptBlock in there, but other than that it is. – Bernie Dec 28 '11 at 18:48
feedback

Your Answer

 
or
required, but never shown