0

I have an installation file (*.msi) which installs a service. I would like to install this service on a remote server.

Doing that via Remote Desktop is not a problem, but I cannot find a solution for doing that automatically using a batch file or a PowerShell command that would install application remotely using the local file.

What is the problem:

I have a Bamboo CI server that results in the installation file. I'd like to install the application on a remote server using the script, without copying the installation file (similar way to deploying application using the Ms Web Deploy).

Is it possible to do this in that way?

So far I have tried installutil.exe (works locally, but I cannot configure it to install it remotely), ServiceConsole, but it somehow doesn't install correctly application using create command and I can't overwrite the application.

serenesat
  • 4,611
  • 10
  • 37
  • 53

2 Answers2

1


i do that before
first download msi or exe command with invoke-webrequest like

invoke-webrequest http://mysiteapp -outfile c:\myapp.msi

then
you can install app with msiexec or some app can install like this

myapp.msi /quite  

if you have telnet from server you can make script and then run...
if you have not access telnet you should use invoke-command or psexec this link can help you

Soheil
  • 837
  • 8
  • 17
0

The executable to use when installing .msi files is msiexec.exe; you can call that remotely using PowerShell's Invoke-Command cmdlet, and pass it the remote path to the .msi file as a parameter (look up the msiexec.exe syntax for details).

The trick will be getting access to the .msi file on the local server from the remote PowerShell session. You will almost certainly need to create the session using CredSSP authentication, so that the remote PowerShell session created by Invoke-Command will be able to make a connection back to your local server and access the .msi file.

I hope this sets you on the right path.

jbsmith
  • 1,616
  • 13
  • 10