Feb 07 2024 12:12 PM
The scripts I create normally have output on what it's doing and the status of it. I put the script under the Software Library Workspace > Scripts section. After running the script on a computer, I notice that the output of my script do not have any carriage returns or line feeds. Does anyone know how to get them to display? A simple test I did was use this script:
Write-Host "1"
Write-Host "2`r`n"
Write-Host "3"
Write-Output "4"
Write-Output "5`r`n"
Write-Output "6"
The output shows like this:
1 2 3 ["4","5\r\n","6"]
Feb 08 2024 05:34 AM
Feb 08 2024 10:07 AM
The script outputs what it's doing, so that's why it has multiple lines. It's normal for a script to have multiple lines of output.
Feb 08 2024 07:12 PM