I am running a PowerShell script from within a batch file. The script fetches a web page and checks whether the page\'s content is the string \"OK\".
The PowerShell
You can use any of these in your scenario since they write to the default streams (output and error). If you were piping output to another commandlet you would want to use Write-Output, which will eventually terminate in Write-Host.
This article describes the different output options: PowerShell O is for Output