-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
Resolution-AnsweredThe question is answered.The question is answered.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
Writing a binary module I noticed that the current working directory isn't set correctly on Windows.
[System.Environment]::CurrentDirectory
always returns C:\Windows\system32
, no matter what.
Expected behavior
PS> Set-Location 'C:\Temp'
PS> [System.Environment]::CurrentDirectory
C:\Temp
Actual behavior
PS> Set-Location 'C:\Temp'
PS> [System.Environment]::CurrentDirectory
C:\Windows\system32
Environment data
Name Value
---- -----
PSVersion 7.3.3
PSEdition Core
GitCommitId 7.3.3
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
Metadata
Metadata
Assignees
Labels
Resolution-AnsweredThe question is answered.The question is answered.