3 ms·
What do you mean with #3? A command like below runs perfectly fine with no PS* specific junk. ``` > Get-Process | Select -Last 5 Name,ProcessName,Company,Path
by whodev 3y ago
What do you mean with #3? A command like below runs perfectly fine with no PS* specific junk.
```
> Get-Process | Select -Last 5 Name,ProcessName,Company,Path | ConvertTo-Json
[
{
"Name": "winlogon",
"ProcessName": "winlogon",
"Company": null,
"Path": null
},
{
"Name": "WmiPrvSE",
"ProcessName": "WmiPrvSE",
"Company": null,
"Path": null
},
{
"Name": "WMIRegistrationService",
"ProcessName": "WMIRegistrationService",
"Company": null,
"Path": null
},
{
"Name": "Zoom",
"ProcessName": "Zoom",
"Company": "Zoom Video Communications, Inc.",
"Path": "C:\\Users\\user\\AppData\\Roaming\\Zoom\\bin\\Zoom.exe"
},
{
"Name": "Zoom",
"ProcessName": "Zoom",
"Company": "Zoom Video Communications, Inc.",
"Path": "C:\\Users\\user\\AppData\\Roaming\\Zoom\\bin\\Zoom.exe"
}
]
```
And when you say "Just the common '|fl XXX' expression will trigger this" does that mean you are doing this `<command> | fl X | ConvertTo-Json`? Because if so, that's why your getting all the PS specific junk.
- mst 3y agoIIRC HN really wants an indented paragraph for code blocks, your ``` did not go precisely to plan, I don't think - if you indent: ``` foo bar ``` it'll be happier.