Open
Description
On my Windows 10 box I opened a Powershell session and a Cmd session in both of which I changed the current working directory with "cd Desktop". Now I do this:
PS C:\Users\XXX\Desktop> (Get-PEB -Id (ps powershell).Id).ProcessParameters.CurrentDirectory
C:\Users\XXX\
PS C:\Users\XXX\Desktop> (Get-PEB -Id (ps cmd).Id).ProcessParameters.CurrentDirectory
C:\Users\XXX\Desktop\
As you can see, the output is correct for Cmd, but wrong for Powershell. Is this a known problem?
Update: SysInternals Process Explorer shows the same discrepancy, so at least the two of them behave in the same way - but still unexpectedly.
Update 2: In the command line help there is a little bug in an example:
C:\PS>$NotepadPEB = Get-PEB -Id (ps notepad)
C:\PS> $NotepadPEB.InInitializationOrderModuleList
You forgot .Id
. So in the first line it sould be: Get-PEB -Id (ps notepad).Id
.
Metadata
Metadata
Assignees
Labels
No labels