According to Logging Commands I should be able to log details on VSTS details window.
But when I use Write-Host in Posershell, the Release fails with error:
A command that prompts the user failed because the host program or the command type does not support user interaction. Try a host program that supports user interaction, such as the Windows PowerShell Console or Windows PowerShell ISE, and remove prompt-related commands from command types that do not support user interaction, such as Windows PowerShell workflows.
I am using PowerShellOnTargetMachines Using File
We dont support Write-Host in PowerShellOnTargetMachines task. Please use Write-Verbose -Verbose "your log" for logging.
Let us know if you need anymore help.
I am assuming you are able to get unblocked by using Write-Verbose -Verbose. Please feel free to reopen the issue if you need any help on this.
@sufyannisar You can also try using Write-Output "your logs" to display your logs. That will avoid the [debug] prefix that comes with Write-Verbose
I was also getting the same issue. But below code worked for me.
Write-Output "##vso[task.logissue type=warning;] Error Message"
Most helpful comment
@sufyannisar You can also try using Write-Output "your logs" to display your logs. That will avoid the [debug] prefix that comes with Write-Verbose