profile.ps1 doesnt load when Windows Powershell 2.0 engine was disabled.
We have been using automation script for our deployment. We are using the latest version of System.Management.Automation.
System.Management.Automation, Version=220.127.116.11, Culture=neutral, PublicKeyToken=31bf3856ad364e35
We have few modules referred in profile.ps1 which automatically loads when we execute the ps1 files. This works fine if we have enabled Windows Powershell 2.0 engine.
If we disable Windows Powershell 2.0 Engine this doesnt load the profile.ps1 in $pshome and scripts throws functions not found error.
This seems to be weird behavior as all our scripts still works with Powershell 5.1
Would need your attention to help fixing this or provide a solution to fix this.