gpt4 book ai didi

Azure DSC - 使用 SAS 从存储帐户复制文件 - 错误 "Relative path is not supported"

转载 作者:行者123 更新时间:2023-12-02 00:43:23 24 4
gpt4 key购买 nike

当我尝试使用 DSC 将网站(甚至单个文件)复制到虚拟机时,使用以下配置:

    File WebSiteContent {
Ensure = "Present"
SourcePath = "https://MYBLOB.blob.core.windows.net/prod/index.html?sv=2016-05-31&ss=b&srt=s&sp=rl&se=2017-11-29T21:47:36Z&st=2017-07-26T13:47:36Z&spr=https&sig=SIG_HERE"
DestinationPath = "C:\inetpub\backend\app_data"
Type = "Directory"
}

我收到错误:

[错误] 不支持相对路径。相关文件/目录是:https://MYBLOB.blob.core.windows.net/prod/index.html?sv=2016-05-31&ss=b&srt=s&sp=rl&se=2017-11-29T21:47:36Z&st =2017-07-26T13:47:36Z&spr=https&sig=SIG_HERE。\r\n

不确定原因是什么,因为这是文件的绝对路径。任何使它发挥作用的建议都值得赞赏:)

最佳答案

您需要使用 xPSDesiredConfiguration 模块中的 xRemoteFile

    File SetupDir {
Type = 'Directory'
DestinationPath = 'c:\Setup'
Ensure = "Present"
}

xRemoteFile SQLServerMangementPackage {
Uri = "http://go.microsoft.com/fwlink/?LinkID=824938"
DestinationPath = "c:\Setup\SSMS-Setup-ENU.exe"
DependsOn = "[File]SetupDir"
MatchSource = $false
}

关于Azure DSC - 使用 SAS 从存储帐户复制文件 - 错误 "Relative path is not supported",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45327055/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com