powershell - Azure-Runbook : Suppress output of a cmdlet to summary or history

标签 powershell azure automation

在 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/

相关文章:

forms - PowerShell v3 调用 WebRequest : Troubles with forms

powershell - 有没有办法回显Powershell命令行?

c# - 无法在 C# 中导入 AzureAD 模块

testing - 自动化测试方法-哪个最好?

regex - 适用于mm-dd-yyyy的Powershell正则表达式

powershell - 将虚拟文件夹添加到 Azure Web App

asp.net - NGINX HTTPS 代理无法使用 Azure AD 重定向 Uri

Python 通过 SSH 身份验证克隆私有(private) GitHub 存储库,无需访问 ssh 二进制文件(在 Azure Functions 下)

ios - 真实 iOS 设备上的 Appium

python - Python 是否有用于编写命令行任务脚本的模块?