Upgrade from PowerShell 2, 3, 4 to 5.1

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,

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

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.

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?