How do you set PowerShell's default directory?

前端 未结 13 1889
生来不讨喜
生来不讨喜 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:52

    You could specify the directory to open when starting PowerShell:

    powershell.exe -NoExit -command "& {Set-Location $env:systemroot}"
    

    Just use it in your shortcut.

    Or use a profile to set a start directory.

提交回复
热议问题