Is it possible to change the default value of $profile to a new value?

The only thing I can think of is “dot sourcing” your profile at the powershell invocation.

For example:

powershell -noprofile -noexit -command "invoke-expression '. ''C:\My profile location\profile.ps1''' "

By changing the script that invoke-expression command points to you can place your “profile” anywhere you’d like. Then, create shortcut that launches PowerShell and set the target to the above command.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)