Powershell

Initial startup directory in PowerShell

Up until now I had a Set-Location statement in my Microsoft.PowerShell_profile.ps1 startup file that set my in the directory above all my work related folders. However, that did not work well with Visual Studio Codes build step as it runs with the standard terminal. Asking CoPilot I got the following (working) solution

if (-not $env:TERM_PROGRAM -eq "vscode") {
    Set-Location (Get-CanonicalCasePath c:\myprojectsfolder)
}

I’m considering turning more of my customizations off to improve on the startup time.