Run ISE As (Profile messes up)

So I have custom profiles for my admin accounts that when I run as different user the profile executes for the different user (this is what I want) but things don’t work perfectly like the colors I define in the profile do not load until later as I’m typing or running things then it starts to use the colors all wrong. I fixed this on another profile and for some reason it seemed to me to be permissions but I can’t figure it out again. I have full access permissions over the profile script so this is not the permission that is the issue.

Any suggestions and thank you for the help?

How did you define/set the color changes in the profile ? Profile script loads on ISE startup and no further action is required to get it applied.

That is correct the profile exist in the users documents directory, IE:

C:\Users\admin1\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1

but User 2 is running the ISE as that user. User 2 has full control access over the above path. I had the same issue before with admin2 and it finally came to me in how to fix but I have not been able to remember what I did then.

For example I run this in the above profile:

write-host -ForegroundColor Green "UserProfile C:\Users\admin1\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1"
write-host -ForegroundColor Green "AllUserProfile C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1"

I also put in some other text I like to have that is displayed in red and yellow but it all shows in white with this profile and then commands I run after the profile loads all start loading in yellow,green and red text.

I found the issue and fixed it! The issue is the account admin1 needs security access to the User 2 profile. I just gave it modify access and the issue has been resolved. Would be interesting to know what it is (File/folder location) in the profile that is causing this. I guess I could run process monitor to figure it out.