You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set the content of $PROFILE.CurrentUserAllHosts (profile.ps1 under $home\Documents\PowerShell) to print $PWD (such as Write-Verbose -Message $pwd -Verbose)
Launch PWSH or PWSH-Preview from taskbar icon
Does NOT repro if starting PWSH or PWSH-Preview using full path
Note: The shortcut Target property is set to "C:\Program Files\PowerShell\6 (or 6-preview)\pwsh.exe" -WorkingDirectory ~
Expected behavior
It should list user's $home as the current working directory
Actual behavior
It produces VERBOSE: C:\WINDOWS\system32 as the output
Environment data
>$PSVersionTable
Name Value
---------
PSVersion 6.1.0 or 6.2.0-preview.1
PSEdition Core
GitCommitId 6.1.0 or 6.2.0-preview.1
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Steps to reproduce
$PROFILE.CurrentUserAllHosts(profile.ps1under$home\Documents\PowerShell) to print $PWD (such asWrite-Verbose -Message $pwd -Verbose)Expected behavior
$homeas the current working directoryActual behavior
VERBOSE: C:\WINDOWS\system32as the outputEnvironment data