1

When I start Windows PowerShell in Windows 7 Enterprise 64-bit, it runs an (incorrect) profile -- but I cannot see that PowerShell code in any of my Windows PowerShell profile files. [edit...] So where could that errant profile be located? I sure can't see it with the tools I am using.

  • This isn't a question. The more effort you put into your question the better quality answers you'll tend to get. – Drew Khoury Sep 24 '13 at 03:32

1 Answers1

3

In 64-bit Windows, there are 2 sets of locations for system-wide PowerShell profiles:

%windir%\system32\WindowsPowerShell\...
%windir%\SysWOW64\WindowsPowerShell\...

To view the 64-bit (i.e. native) version of the PowerShell profile files in a 32-bit application, you need to look at %windir%\sysnative\WindowsPowerShell. (In a 64-bit application, the 64-bit programs will be in the (now mis-named) system32.)

(Yes, it is possible to create a bad PowerShell profile that you cannot see with 32-bit tools unless you use sysnative -- I did it earlier today by accident.)