Skip to content

out-file producing weird characters #16730

@computechrr

Description

@computechrr

Prerequisites

Steps to reproduce

When using out-file with or without specifying any encoding the file has some weird characters at the beginning of the file

�[32;1m NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName�[0m
�[32;1m ------ ----- ----- ------ -- -- -----------�[0m

I've tried this on different computers all using ps 7.2.1, windows 10, server 2016 etc. When using the same get-process |out-file with powershell 5.1 it works as expected without those characters.

Expected behavior

NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName

Actual behavior

�[32;1m NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName�[0m

Error details

No response

Environment data

7.2.1

Visuals

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions