When I am working with Powershell, I would like to have my starting directory in the web application that I am working.

In order to change the directory:

  1. Run powershell as administrator and execute the following command:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

    This will permit PowerShell to run local scripts, and scripts downloaded from the internet that have been signed. Read more about this command in the documentation.

  2. Create a new file named profile.ps1 in the WindowsPowerShell folder. (C:\Windows\System32\WindowsPowerShell\v1.0)
  3. Open profile.ps1 and add the following command to set your default working directory:

    Set-Location C:\my\default\working\directory

  4. Open a new powershell window… the changes should have taken effect.