Upgrade from PowerShell 2, 3, 4 to 5.1

Welcome Forums General PowerShell Q&A Upgrade from PowerShell 2, 3, 4 to 5.1

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

5 months, 3 weeks ago.

  • Author
  • #98614

    Points: 32
    Rank: Member

    Hi all,

    As we want to use DSC and JEA on all our servers, we are planning to upgrade all our Windows hosts to PowerShell 5.1. As we have various PowerShell versions and various scripts, we cannot cover all scenarios with tests.

    Is there a list of known commands/patterns that have been deprecated thru the history of PowerShell ?

    Have a nice day,

  • #98616

    Points: 386
    Helping Hand
    Rank: Contributor

    I'm not really aware of anything significant that's been deprecated, really. Far as I've been able to tell, PS is pretty good with backwards compatibility up until you cross the boundary to PS Core 6 — 5.1 should be compatible with basically everything written in earlier versions, to my knowledge.

    Even so, I'd recommend updating them to comply with best practices, regardless. A lot of good coding patterns weren't even possible in PS 2 (e.g., parameter validation, function attributes, proper pipeline handling, etc.)

  • #98652

    Points: 32
    Rank: Member

    Thank-you for your message. It's my opinion too but my team keeps telling my creepy stories about old PS scripts dealing with XML and never upgraded nor compatible with newer versions ... but no one knows which script it is.

    So, we plan to upgrade hosts (after a snapshot) and add '-version x' to the powershell.exe command line launching buggy scripts.

  • #105274

    Points: -19
    Rank: Member

    Did you ever get the Powershell upgrade completed? I believe I have to upgrade all Win7 32bit and 64bit systems to PowerShell 5.1 from 2.0 before I can complete an Outlook Junk email Phishing add-in install?

The topic ‘Upgrade from PowerShell 2, 3, 4 to 5.1’ is closed to new replies.