Windows PowerShell 在哪里设置 $profile? [英] Where does Windows PowerShell set $profile?
问题描述
我想移动我的默认我的文档\WindowsPowerShell"文件夹.但是,当我尝试这样做时,PowerShell 当然找不到 $profile.是否有我可以编辑的文件或其他内容以将 PowerShell 指向不同的启动文件夹?
我可以建议您在 $profile.AllUsersAllHosts
>
$profile.AllUsersAllHosts
类似于 C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
相关问题:是否可以将 $profile 的默认值更改为新值?
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 that I can edit to point PowerShell to a different startup folder?
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?
这篇关于Windows PowerShell 在哪里设置 $profile?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!