如何隐藏 Select-AzureRmSubscription 的控制台输出

Raf*_*fal 3 azure azure-powershell powershell-workflow azure-automation

有谁知道如何在作为 powershell 工作流运行的 azure 工作簿中隐藏命令 Select-AzureRmSubscription 的输出

谢谢

Bru*_*ria 5

您可以使用 Out-Null。适用于任何 PowerShell cmdlet。

Select-AzureRmSubscription | Out-null
Run Code Online (Sandbox Code Playgroud)

Out-Null cmdlet 将其输出发送到 NULL,实际上,将其从管道中删除并阻止输出显示在屏幕上。

https://msdn.microsoft.com/en-us/powershell/reference/5.1/microsoft.powershell.core/out-null