Azure Runbook输出到blob容器 [英] Azure runbook output to blob container

查看:112
本文介绍了Azure Runbook输出到blob容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试将Runbook的输出存储到Azure blob容器中。 

I am trying to store the output of runbook into the Azure blob container. 

请帮助我就这个。

推荐答案

您好,Sayyad! 感谢您使用Azure。

Hello, Sayyad!  Thank you for using Azure.

首先,让我们从Azure自动化中Runbook输出和消息的文档开始:

First and foremost, let's start off with the documentation on Runbook output and messages in Azure Automation:

https://docs.microsoft.com/en-us/azure/automation/automation -runbook-output-and-messages

完成后,Paul Kotylo撰写了一篇精彩的博客,引导您使用Export-CSV for Azure blob存储:

With that out of the way, Paul Kotylo has written an excellent blog that walks you through using Export-CSV for Azure blob storage:

< a href ="https://blogs.technet.microsoft.com/cloudlojik/2017/09/13/using-export-csv-in-azure-automation/"> https://blogs.technet.microsoft.com/ cloudlojik / 2017/09/13 / using-export-csv-in-azure-automation /


无论您是刚刚开始使用Azure自动化还是与其完全一致,都可能会出现这样的情况:您希望将脚本的输出捕获为CSV使用Azure自动化,您的脚本在虚拟环境
中运行,当您将数据输出到文件/ csv时,它只会保存在执行该脚本的临时实例中。脚本完成后,您认为'将要保留的数据将被删除。为了捕获该信息
并保留它,您必须将其保存到外部环境。您确实有一些选项,但最具成本效益且直观的方法是将其保存到blob存储帐户。

Whether you are just getting started with Azure Automation or you are pretty well in tune with it, there will likely come a point where you will want to capture the output of your scripts to a CSV. With Azure Automation, your scripts are run in a virtual environment and when you output your data to a file/csv it will only be saved in that temporary instance from where that script was executed. After the script is complete, that data that you 'thought' was going to persist is deleted. In order to capture that information and persist it you have to save it to an external environment. You do have a few options, but the most cost effective and intuitive approach is to save it to a blob storage account.


  1. Azure RM模块必须安装在Azure自动化中。您可以通过转到 PowerShell图库 和
    将它"部署到Azure自动化"
  2. 安装在本地工作站上的Azure RM模块。如果您运行的是PowerShell 3.0或更高版本,则可以作为管理员运行Install-Package AzureRM。
  3. Azure订阅
  1. Azure RM Module must be installed in Azure Automation. You can accomplish this by going to the PowerShell Gallery and having it "Deploy[ed] to Azure Automation"
  2. Azure RM Module installed on your local workstation. If your running PowerShell 3.0 or later, you can run Install-Package AzureRM as an administrator.
  3. Azure Subscription



如何



创建存储帐户




首先创建一个存储帐户。如果你还没有存储帐户,你将连接到Azure Resource Manager通过本地PowerShell客户端:
First create a Storage Account. If you don't already have one, you'll to connect to Azure Resource Manager through your local PowerShell client:


这篇关于Azure Runbook输出到blob容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆