Powershell - Write-Warning Cmdlet

Cmdlet

Write-Warning cmdlet 用于编写警告消息。

在这些示例中,我们看到了 Write-Warning cmdlet 的运行情况。

例

在此示例中,我们将显示警告消息。

Write-Warning  "Test Warning"

输出

你可以看到具有高内存使用率的进程。

WARNING: Test Warning