This is primarily useful for working with Visual Studio Code's integrated terminal because the $PWD property is set before PowerShell opens meaning that the test will be accurate. When using the external powershell window use the following command.
powershell -noexit -command cd "path/to/project"
To set your system to allow you to execute powershell scripts you need to run the following.
Set-ExecutionPolicy RemoteSigned -scope currentuser
see this article for more information
Powershell profile scripts are located in the following path.
C:\Users\[username]\Documents\WindowsPowershell\Microsoft.PowerShell_profile.ps1
if a file doesn't exist there create one. If you are using vs code a quick way to do this is to run the following.
code $profile
this will open the new file in vscode.