DSC xRemoteFile

Hi guys,

I’m working on environment where I have to deliver IIS app from ZIP file stored in Azure Blob.
Basically I have xRemoteFile which downloads file from specific URL to local disk, followed by xArchive that unzip that file to specific location. If the zip file on source is changed, is DSC going to detect that change and redownload file if I set “MatchSource = $true”? If it is, how can I make sure that corresponding xArchive is executed if new zip file is downloaded?


You can use ‘Checksum’ property of xArchive to achieve this. ‘Checksum’ supports the following: “SHA-1”, “SHA-256”, “SHA-512”, “CreatedDate”, “ModifiedDate”

Didn’t know there was Checksum for xArchive.
Will try it right now.

Thanks Nitin


Tried… and it failed with “ModifiedDate”. Looks like Validation is required

PowerShell DSC resource MSFT_ArchiveResource failed to execute Test-TargetResource functionality with error message: Specifying a Checksum without requesting content validation (the Validate parameter) is not meaningful Parameter name: Checksum

xArchive works, but xRemoteFile does not detect change…
Basically what I need is to download file if it was changed on remote site…

You can’t achieve that via xRemoteFile resource. You will have to write something custom for your scenario. Keep in mind that in order to figure out if something has changed on the remote site you either have to download the files every time and compare, or create a protocol that simplifies this process.