M
M
Morrowind2020-10-31 15:12:28
PowerShell
Morrowind, 2020-10-31 15:12:28

Why is file information not displayed in the Get-ChildItem cmdlet?

Hey!
Question such: Delivered PS7.0. Everything is fine, but when executing the dir command (aka Get-ChildItem ) via invoke-command, the output of information is somewhat discouraging (see screenshot). How would the number of files he sees.

5f9d54342576f105707531.png

Moreover, if you run the command locally on the PC, everything is OK. PS5.1 also executes the same code normally. Run as admin of course.
Separately, in the ps7 utility, the same thing. This is not a problem with VS code, as we managed to find out in a practical way.
The nuance is that if you enter the -Name key, then it will display the file names separately.

Gentlemen and ladies! Can you please explain in ps7.0 that something has changed in this regard? Change display order via invoke-command? I've tried googling but haven't found an answer yet.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MaxKozlov, 2020-10-31
@hekkaaa

This is just an assumption, but apparently you have 5.1 on another computer
And the display format has changed slightly between 5.1 and 7,

Get-ChildItem C:\  | Select-Object Mode, LastWriteTime, Length, Name

will most likely show you what you want.
Maybe there is even a corresponding bug on github

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question