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

前端 未结 8 1538
予麋鹿
予麋鹿 2020-12-10 01:18

So I would rather not create my profile file here:

C:\\Users\\fmerrow\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_profile.ps1

I mea

8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-10 01:37

    According to Scripting Guy article Understanding the Six PowerShell Profiles, $profile is expanded from $PsHome\Microsoft.PowerShell_profile.ps1; $pshome is the powershell installation directory and a read-only variable; according to a post on this thread, Microsoft tells us this cannot be changed.

提交回复
热议问题