powershell - Set-AzureStorageBlobContent 在 Powershell 中以 100% 的速度挂起
问题描述
我有一个从 ssrs 服务器生成 pdf 报告的 powershell 脚本,在文件创建后没有锁定,因为我能够在测试期间移动它或将其作为附件等通过电子邮件发送。
当我的脚本尝试将文件上传到 azure 时,它以 100% 挂起,我检查了 azure 并且文件在那里,但在 powershell 中仍然处于 100%。
有任何想法吗?
下面的代码,我没有包含用于生成报告的功能代码,因为它非常冗长。
GenerateReport -ReportFile $FullFilePath -StartDate $StartDate -EndDate $EndDate| Out-Null
$context = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
$files = Get-ChildItem $BaseFolder -Recurse
foreach($file in $files)
{
$blobfile = "Epsom/$($file)"
Set-AzureStorageBlobContent -File $File.FullName -Container $ContainerName -Context $context -Blob $blobfile -Force -ErrorAction SilentlyContinue
}
解决方案
推荐阅读
- excel - 查找包含特定年份的第一个日期
- python - 多个 TCP 到串行连接 python 尝试。
- kentico - Kentico 11 页面类型字段显示名称
- arrays - 如何使用 Sprintf 转义 YAML 文件获取的字符串中的单引号
- c# - Data First EF,系统表与系统命名空间冲突
- python - 将字符串转换为与纳秒不同单位的时间戳
- generator - 将 ImageDataGenerator 与您自己的生成器一起使用
- regex - 如何使这个正则表达式 URL 模式在 Django 2 中工作
- apache-spark - Pyspark 根据列值复制行
- tinymce - 使用 PHP7 的 moxiemanager 出错