Lec*_*dal 2 azure powershell-dsc
当我尝试使用 DSC 将网站(甚至是单个文件)复制到 VM 时,配置如下:
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"
}
Run Code Online (Sandbox Code Playgroud)
我收到一个错误:
[ERROR] Relative path is not supported. The related file/directory is: 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
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1709 次 |
| 最近记录: |