Profile scripts are automatically executed whenever PowerShell launches. Your profile script is the perfect place to customize your PowerShell environment, change the prompt, colors, and make any changes you would like to keep in all of your sessions.
To create and/or edit your PowerShell profile script, here is a line that makes sure the profile script exists before it opens it in the ISE PowerShell editor:
If you are sure the profile already exists, you can shorten the line:
You need to make sure the execution policy allows script execution if you want your profile script to run automatically the next time you launch PowerShell. For example: