从命令行使用 Azure 开发存储
我需要使用脚本将一些文件上传到我的 Azure 存储模拟器。使用 Azure PowerShell cmdlet 可以轻松执行远程 Azure 存储的相同任务,只需调用
Add-Blob -BlobType Block -FilePath $myFilePath -ContainerName $myContainerName
但是如何对本地存储模拟器执行相同的操作?
I need to upload some files to my Azure storage emulator using scripts. The same task for remote Azure storage is performed easily with Azure PowerShell cmdlets, just call
Add-Blob -BlobType Block -FilePath $myFilePath -ContainerName $myContainerName
But how can I do the same thing for local storage emulator?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于那些寻找如何使用 Azure SDK (2.1) 执行此操作的人,以下是操作方法:
如果您想实际上传到 Azure 存储帐户,请更改 $StorageContext:
For those looking for how to do this with Azure SDK (2.1), here is how:
If you want to actually upload to an Azure storage account, change the $StorageContext:
您可以使用 Azure 命令行工具,此处提供:
https://github.com/RobBlackwell/AzureCommandLineTools
它们在普通命令提示符下运行,它们实际上不是 powershell cmdlet。
You could use the Azure Command Line Tools, available here:
https://github.com/RobBlackwell/AzureCommandLineTools
They run on the normal command prompt, they're not actually powershell cmdlets.
使用 PowerShell Cmdlet 找到了解决方案。
您需要为 cmdlet 指定 -UseDevelopmentStorage 选项:
或者
Found the solution using PowerShell Cmdlets.
You need to specify -UseDevelopmentStorage option to the cmdlets:
or