PowerShell support on Linux

Copper Contributor

I am trying to invoke Powershell 7.4 on Linux RHEL8 through a java program and submitting commands and reading output using streams. As soon as the powershell starts , the inputstream is reading some unknown characters from the powershell output for e.g. '[?1h' and '[?1l'.

I need a way such that I don't read these characters. I tried setting the encoding in the input stream to UTF-8, but that didn't solve the problem.


Would really appreciate if someone could provide some inputs on this.




2 Replies
What cmdlet do you use to read the streams?
Any update?