团队,我正在尝试从本地计算机上载文件到azure blob存储帐户。我可以通过在本地Power Shell中运行脚本来上传文件。但是,当我在Azure Automation Power Shell Runbook中尝试相同的脚本时,出现错误。
Test-Path -Path 'D:\UploadFolder\Sample.txt' -- Returns True in local powershell while uploading
Test-Path -Path 'D:\UploadFolder\Sample.txt' -- Returns False in azure automation powershell runbook while uploading
错误:找不到驱动器“ D”
我检查了Runbook中的以下代码,这些代码返回false。
Get-PSDrive -Name 'D' -- Return false
我的问题:
1)我们如何访问Runbook中的任何本地文件路径?
2)我们是否有天蓝色的刀片可以在Automation account本身中存储/创建文件? (此询问的目的是“我想手动/以脚本方式在azure自动化中创建文件以向其中写入一些内容,然后再在Azure blob存储中上载相同文件。)
预先感谢