I am passing a powershell script through userdata to terraform ec2 windows instance, should I use Write-Host or Write-Output, so that the output from the script gets written to the execution log file.
if (!(Test-Path -Path $outputFile)) {
Write-Warning "$outputFile does not exist`r`n"
}
else {
Write-Host "$outputFile exists`r`n"
}