Windows PowerShell在哪里设置$ profile?

Cha*_*son 7 powershell

我想移动默认的"My Documents\WindowsPowerShell"文件夹.但是,当我尝试这个时,PowerShell当然找不到$ profile.是否有可以编辑的文件或其他内容将PowerShell指向其他启动文件夹?

man*_*lds 7

我可以建议您点源文件中包含您的个人资料内容的文件 $profile.AllUsersAllHosts

$profile.AllUsersAllHosts 是这样的 C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1

相关问题:是否可以将$ profile的默认值更改为新值?

  • @charles Anderson您将必须创建。据我所知,最初没有创建任何配置文件。只需执行`New-Item -path $ profile.AllUsersAllHosts -type file -force`` (2认同)