I created a profile.ps1 in the same directory that contains the powershell executable, which on my machine is C:\Windows\System32\WindowsPowerShell\v1.0
The profile file is definitely executed when I run powershell.exe
However when I enter $profile at the powershell prompt, the following non-existent filename is returned
C:\Users\richard\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.psi
Does anyone know how this inconsistency may have happened and what steps should I take to resolve it?