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

Welcome Forums General PowerShell Q&A How to upgrade powershell module 4.X to 5.X

This topic contains 3 replies, has 3 voices, and was last updated by

6 months, 2 weeks ago.

  • Author
  • #105820

    Points: 1
    Rank: Member

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

  • #105826

    Points: 403
    Helping Hand
    Rank: Contributor

    Remote is a bit tricky.

    See here for the MSI installer for the appropriate OS.

    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.

    • #107704

      Points: 1
      Rank: Member

      Thank you would try and update you


  • #105829

    Points: 790
    Helping Hand
    Rank: Major Contributor

    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...

The topic ‘How to upgrade powershell module 4.X to 5.X’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort