在 Azure-runbook 中,如何抑制 cmdlet 的输出显示在摘要或历史日志中?
例如
Start-AzureVM -Name ...
发出类似的东西
PSComputerName : localhost
PSSourceJobInstanceId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Id : <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d9b8a3acabbc86b8bdb499bfb6b6f7bab6b4" rel="noreferrer noopener nofollow">[email protected]</a>
Type : User
Subscriptions : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Tenants : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
PSComputerName : localhost
PSSourceJobInstanceId : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
OperationDescription : Start-AzureVM
进入摘要。
最佳答案
您只能在 Azure-Runbooks 中的“InlineScript {}”内使用“out-null”
关于powershell - Azure-Runbook : Suppress output of a cmdlet to summary or history,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31157328/