# How to upgrade powershell module 4.X to 5.X

**URL:** <https://forums.powershell.org/t/how-to-upgrade-powershell-module-4-x-to-5-x/11081>\
**Category:** PowerShell Help\
**Created:** [August 2, 2018, 11:40am UTC](https://forums.powershell.org/t/how-to-upgrade-powershell-module-4-x-to-5-x/11081 "2018-08-02T11:40:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sursthi](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sursthi](https://forums.powershell.org/u/sursthi)\
**Post date:** [August 2, 2018, 11:40am UTC](https://forums.powershell.org/t/how-to-upgrade-powershell-module-4-x-to-5-x/11081/1 "2018-08-02T11:40:40Z")

</div>

Is there a way to upgrade powershell version from4.X to 5.1 remotely? I have 300+ servers that needs to be upgraded.

---

<div class="post-metadata">

**Author:** ![ta11ow](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/ta11ow/32/131_2.png) [@ta11ow](https://forums.powershell.org/u/ta11ow)\
**Post date:** [August 2, 2018, 2:31pm UTC](https://forums.powershell.org/t/how-to-upgrade-powershell-module-4-x-to-5-x/11081/2 "2018-08-02T14:31:51Z")

</div>

Remote is a bit tricky.

See here for the MSI installer for the appropriate OS. [https://www.microsoft.com/en-us/download/details.aspx?id=54616](https://www.microsoft.com/en-us/download/details.aspx?id=54616)

With that, you should be able to do a silent install. Do note that it will not complete until a reboot; the day you do this, you may want to schedule a late-night restart domain-wide or something of that nature.

```
$Computers = Get-Content -Path '.\ServerList.txt'
$MsiLocation = '\\server\share\WMF5.1.msi'
Invoke-Command -ComputerName $Computers -ScriptBlock {
    Start-Process -NoNewWindow -FilePath 'msiexec.exe' -ArgumentList ('/a "{0}"' -f $MsiLocation), '/qn', '/norestart'
}
```

Feel free to use the ‘/forcerestart’ switch if you don’t mind taking those servers down for 10-15mins following the installation to get the new version of PS sorted out.

You could do a batch job like this early morning or something and have it all ready by the time everyone gets to work in the morning.

---

<div class="post-metadata">

**Author:** ![postanote](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@postanote](https://forums.powershell.org/u/postanote)\
**Post date:** [August 2, 2018, 3:44pm UTC](https://forums.powershell.org/t/how-to-upgrade-powershell-module-4-x-to-5-x/11081/3 "2018-08-02T15:44:54Z")

</div>

This is OK for client systems, but be sure to read the docs for version impacts on say Exchange, System Center, etc… versions. For example…

[https://docs.microsoft.com/en-us/powershell/wmf/5.0/productincompat](https://docs.microsoft.com/en-us/powershell/wmf/5.0/productincompat)

---

<div class="post-metadata">

**Author:** ![sursthi](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sursthi](https://forums.powershell.org/u/sursthi)\
**Post date:** [August 7, 2018, 11:41am UTC](https://forums.powershell.org/t/how-to-upgrade-powershell-module-4-x-to-5-x/11081/4 "2018-08-07T11:41:28Z")

</div>

Thank you would try and update you

&nbsp;

---

<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:34pm UTC](https://forums.powershell.org/t/how-to-upgrade-powershell-module-4-x-to-5-x/11081/5 "2024-05-16T20:34:35Z")

</div>


