How to output something in PowerShell

前端 未结 7 973
北恋
北恋 2020-12-04 07:43

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

7条回答
  •  無奈伤痛
    2020-12-04 08:35

    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

提交回复
热议问题