# can we install application on multiple remote computers using powershell?

**URL:** <https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652>\
**Category:** PowerShell Help\
**Created:** [June 1, 2019, 11:30am UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652 "2019-06-01T11:30:27Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajeshb](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@rajeshb](https://forums.powershell.org/u/rajeshb)\
**Post date:** [June 1, 2019, 11:30am UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/1 "2019-06-01T11:30:27Z")

</div>

can we install application on multiple remote computers using powershell?

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [June 1, 2019, 11:37am UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/2 "2019-06-01T11:37:05Z")

</div>

Yes !

---

<div class="post-metadata">

**Author:** ![rajeshb](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@rajeshb](https://forums.powershell.org/u/rajeshb)\
**Post date:** [June 1, 2019, 11:43am UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/3 "2019-06-01T11:43:38Z")

</div>

Can you share the forum related to this topic or the script if you have?

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [June 1, 2019, 12:24pm UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/4 "2019-06-01T12:24:27Z")

</div>

The basic principle of PowerShell remoting is , what ever runs locally(almost everything, with few exceptions) will run remotely.

If you have a code that installs your application by running the it locally, put that inside scriptblock and pass it to Invoke-Command. I suggest you to read the documentation of Invoke-Command.

Get-Help Invoke-Command -Online

---

<div class="post-metadata">

**Author:** ![rajeshb](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@rajeshb](https://forums.powershell.org/u/rajeshb)\
**Post date:** [June 1, 2019, 12:46pm UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/5 "2019-06-01T12:46:45Z")

</div>

I have tried… But it only copies the file to remote machine but its not installing.

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [June 1, 2019, 12:53pm UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/6 "2019-06-01T12:53:03Z")

</div>

Please post the code/sample you have. It’ll help anyone trying to help you.

---

<div class="post-metadata">

**Author:** ![rajeshb](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@rajeshb](https://forums.powershell.org/u/rajeshb)\
**Post date:** [June 1, 2019, 2:50pm UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/7 "2019-06-01T14:50:53Z")

</div>

```
$computername = Get-Content computers.txt
$sourcefile = "\\DC16\Share\7Zip.exe"

foreach ($computer in $computername)
{
$destinationFolder = "\\$computer\C$\Temp"

if (!(Test-Path -path $destinationFolder))
{
New-Item $destinationFolder -Type Directory
}
Copy-Item -Path $sourcefile -Destination $destinationFolder
Invoke-Command -ComputerName $computer -ScriptBlock {Start-Process 'c:\temp\7Zip.exe'}
}
```

---

<div class="post-metadata">

**Author:** ![j2sankha](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@j2sankha](https://forums.powershell.org/u/j2sankha)\
**Post date:** [June 1, 2019, 9:02pm UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/8 "2019-06-01T21:02:55Z")

</div>

I didn’t test the script, but by reading it seems okay. Please use invoke-item instead of Start-process.

HTH.

---

<div class="post-metadata">

**Author:** ![johnnyfive](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@johnnyfive](https://forums.powershell.org/u/johnnyfive)\
**Post date:** [June 2, 2019, 3:12am UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/9 "2019-06-02T03:12:42Z")

</div>

You also want to make sure the program doesn’t try to install interactively. If any windows try to pop up on the remote machine that you need to click will prevent the install from finishing. Use whatever switch will allow it to run silently (ex. /silent, /s).

---

<div class="post-metadata">

**Author:** ![rajeshb](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@rajeshb](https://forums.powershell.org/u/rajeshb)\
**Post date:** [June 24, 2019, 11:39am UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/10 "2019-06-24T11:39:06Z")

</div>

Hi Sankhadip,

&nbsp;

thanks for the response…

if we use invoke-item can we use ‘Silent’ argument ?

&nbsp;

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [June 24, 2019, 11:42am UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/11 "2019-06-24T11:42:57Z")

</div>

John Steele is right on, but for 7zip, it’s a capital “S”: `c:\temp\7Zip.exe /S`

Also, since this will be running as your user account on each of those computers, make sure you’re a local admin, and there’s no need to copy the `.exe` over first.

However, with `Start-Process`, there’s a parameter for passing arguments:

```
Start-Process -FilePath 'C:\temp\7zip.exe' -ArgumentList @('/S')
```

---

<div class="post-metadata">

**Author:** ![an0nemus](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@an0nemus](https://forums.powershell.org/u/an0nemus)\
**Post date:** [June 24, 2019, 12:27pm UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/12 "2019-06-24T12:27:37Z")

</div>

Using powershell (or really any command line tool) is up to the binary package if it supports a silent/unattended installation. In the windows world not everything does (but it IS a lot better than it used to be).

You’re facing multiple questions:

1. Does 7zip suppport an unattended/silent install?
2. If it does, what command line settings are you going to need to set?
3. The best way to feed them into powershell.

Here’s one I created for zulu java:

```
$jv=(get-childitem zulu*.msi).name
$jInstall=join-path $drive -childpath "\tools\java"
$jargList="APPLICATIONROOTDIRECTORY=$jInstall /qn"
start-process $jv -ArgumentList $jargList -wait
```

---

<div class="post-metadata">

**Author:** ![rajeshb](https://avatars.discourse-cdn.com/v4/letter/r/22d042/32.png) [@rajeshb](https://forums.powershell.org/u/rajeshb)\
**Post date:** [June 28, 2019, 4:11am UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/13 "2019-06-28T04:11:45Z")

</div>

Hey an0nemus09,

1. how can i find if the application supports silent installation or not?

&nbsp;
1. Invoke-Command -ComputerName $computer -ScriptBlock {Start-Process ‘c:\temp\7Zip.exe’} is the command i am using to install 7zip

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [June 28, 2019, 5:19am UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/14 "2019-06-28T05:19:42Z")

</div>

[quote quote=163146]  
how can i find if the application supports silent installation or not? [/quote]

You are allowed to do your own research. This forum is about scripting with Powershell. Please use your favorite internet search engine to find some information about a particular topic before you start to ask other people in forums about the same topic. You should have basic knowledge at first.

To answer your question - if you’re unsure you search the internet for the name of the application together with the words “silent installation”. Usually it works out of the box for almost all MSI-Installation packages and all Setup.exe. A suitable way to figure that out is to try to run the executable with the command line option “ **/?** ”.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:32pm UTC](https://forums.powershell.org/t/can-we-install-application-on-multiple-remote-computers-using-powershell/12652/15 "2024-05-16T20:32:04Z")

</div>


