Disable echo Output of Windows Remote Script Task

Follow

Ibrahim AbouElyazed -

Issue

You may need to disable echo output of Windows Remote Script task in XLRelease which is intended to be collect as a variable "${output}" and used it in subsequent tasks.

Environment

XLRelease, Windows.

Resolution

You can add @echo off at the beginning of your script in XLRelease ,

@echo off
powershell "& """C:\forXLD\MyScript.ps1"" 

This will make the variable assigned to script output see below as per logs,

 INFO  c.x.xlrelease.script.ScriptService - Script output : Hello, World!
 INFO  c.x.xlrelease.domain.ReleaseActivity - Changed value of variable ${output} from '' to 'Hello, World!'
Cause

By Default every command issued in a batch file would be echoed to the screen.

Additional Information

Find below Explanation about using "@echo off",

By default, the echo feature is on in MS-DOS-based (and later, Windows) systems when executing a batch file. That means that every command issued in a batch file (and all of its output) would be echoed to the screen. By issuing, the 'echo off' command, this feature is turned off but as a result of issuing that command, the command itself will still show up on the screen. By including the '@' symbol in '@echo off', it will prevent the 'echo off' command from being seen on the screen.
Tags

XLRelease, WindowsRemoteScript.

Have more questions? Submit a request
Powered by Zendesk