Create a PowerShell profile as follows.
-
Run PowerShell as administrator and execute the following command:
Set-ExecutionPolicy -ExecutionPolicy RemoteSignedThis 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.
-
In your
Documentsfolder, find a folder namedWindowsPowerShellfor classic PowerShell orPowerShellfor newer PowerShell Core. If it does not exist, that’s ok; just create it. - Create a new file named
profile.ps1in theWindowsPowerShellfolder (orPowerShellfor PowerShell Core). -
Open
profile.ps1and add the following command to set your default working directory:Set-Location C:\my\default\working\directory -
Open a new PowerShell window… the changes should have taken effect.