When I launch PS, by default I get to the user's directory and each time I have to write

cd ../../openserver/domains 

in cmd the same (probably, it is obvious). How can this moment be taken under control? I understand little in terminals

  • Change the working folder in the PowerShell launch shortcut. - PetSerAl

1 answer 1

Everything is tightened from the PS profile. You need to create and configure your profile.

To create a PowerShell profile

  1. Create a folder in the Мои документы folder called WindowsPowerShell
  2. Create a file called profile.ps1 inside this folder
  3. Add any necessary initialization commands to this file and save it.
  4. Each time you run PowerShell , the profile script will be executed.

in this file you can add a transition to the desired directory

Read more in Get-Help about_profiles

  • one
    Many thanks, very helpful. In the created file I registered the set-location path / to / dir / and then launched the console from the administrator to allow the execution of scripts Set-ExecutionPolicy RemoteSigned - simplehtmlcoder