79466569

Date: 2025-02-25 12:39:22
Score: 2
Natty:
Report link

This question is asked long time ago, but my search pointed me here so I share my solution for others doing the same search. As already stated above [Environment]::NewLine is the only reliable way to create a line break in Powershell. You can do a -join([Environment]::NewLine) with your array, this avoids the extra line at the end of the string that Out-String creates.

Reasons:
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Didi