In this article, we will discuss how to maintain backwards compatibility with PowerShell 7.2 when dealing with legacy registry keys, specifically the PowerShellEnginePSCompatibleVersion key in HKLM/Software/Microsoft/PowerShell/3.