Where does Windows PowerShell set $profile?

前端 未结 4 413
你的背包
你的背包 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:00

    You could use junction.exe from Sysinternals to make the WindowsPowershell directory a symbolic link to another location (but not a network drive).

    You could do this if you wanted to store the profile scripts at C:\POSH

    junction.exe "$HOME\Documents\WindowsPowerShell" 'C:\POSH'
    

提交回复
热议问题