How do you set PowerShell's default directory?

前端 未结 13 1740
生来不讨喜
生来不讨喜 2021-01-30 01:37

Is there a way to change PowerShell\'s default location?

How do you set PowerShell\'s default working directory?

13条回答
  •  生来不讨喜
    2021-01-30 01:41

    Step1. open file Microsoft.PowerShell_profile under C:\Users\yourusername\Documents\PowerShell:

    Step2. Add the following line:

    set-location "C:\Whatever\path\you\want\to\set\as\worrkingdir\"

    Step3. relaunch power-shell

提交回复
热议问题