【问题标题】:Map a Azure Fileshare to Azure Runbook local drive to use as temporary storage将 Azure 文件共享映射到 Azure Runbook 本地驱动器以用作临时存储
【发布时间】:2022-09-29 01:35:59
【问题描述】:

我正在尝试访问 AzureStorage 以在 Azure-Powershell-Runbook 中使用它。 我需要完成此操作才能将 SharePoint-Sitetemplate 保存到该位置。 我尝试过的事情是使用:

$StorageAccountKey = Get-AutomationVariable -Name \'StorageKey\'
$Context = New-AzureStorageContext -StorageAccountName \'spotemplatestore\' -StorageAccountKey 
$StorageAccountKey
$container = Get-AzureStorageContainer -Name \'spotemplatestore\' -Context $Context

但我不知道如何在本地访问它。 不能使用 New-PSDrive,因为它不适用于 Azure Powershell Runbook 尝试直接使用 c:\\ 也不起作用,因为运行手册没有直接对 c:\\temp 的写入权限。

    标签: azure powershell azure-storage runbook


    【解决方案1】:

    由于 Azure 自动化中的 Runbook 在 Azure 云平台上运行,他们无权访问其他云或您的本地系统中的资源。

    为了访问本地系统中的资源,请使用Hybrid Runbook Worker featureAzure 自动化。

    笔记那,

    目前不支持 PowerShell 支持安装基于扩展的 Hybrid Runbook Worker。

    要安装该功能,请使用Azure 门户,请关注此link

    如需更多信息,请参考以下链接:

    powershell - Azure Runbook - Get a file from Azure File System Storage - Stack Overflow

    powershell - Not able to access Azure FileShare Storage container from Azure Automation Runbook - Stack Overflow

    【讨论】:

      【解决方案2】:

      【讨论】:

        猜你喜欢
        • 2020-05-06
        • 2021-11-05
        • 2021-06-27
        • 2016-01-10
        • 1970-01-01
        • 1970-01-01
        • 2020-10-22
        • 2021-03-09
        • 2017-08-30
        相关资源
        最近更新 更多