Where does Windows PowerShell set $profile?

前端 未结 4 408
你的背包
你的背包 2021-01-18 05:44

I would like to move my default \"My Documents\\WindowsPowerShell\" folder. However, when I try this, PowerShell of course can\'t find $profile. Is there a file or something

4条回答
  •  [愿得一人]
    2021-01-18 06:08

    What I can suggest is that you dot source the file having the content of your profile in the file $profile.AllUsersAllHosts

    $profile.AllUsersAllHosts is something like C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1

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

提交回复
热议问题