It is because of the PSReadLine module. When you remove PSReadLine, it solves the red prompt but you will not have access to autocompletion.
PSReadLine
PS > Remove-Module PSReadLine