Author Posts

October 7, 2016 at 6:04 pm

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?

Regards,
Vojin

October 7, 2016 at 6:21 pm

You can use 'Checksum' property of xArchive to achieve this. 'Checksum' supports the following: "SHA-1", "SHA-256", "SHA-512", "CreatedDate", "ModifiedDate"

October 7, 2016 at 6:38 pm

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

Thanks Nitin

Vojin

October 7, 2016 at 7:00 pm

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

October 7, 2016 at 8:47 pm

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

October 7, 2016 at 10:10 pm

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.