Author Posts

November 7, 2014 at 7:12 am

Does any one know of a DSC Resource that can copy files via BITS?

November 7, 2014 at 7:18 am

I'm not aware of one, but you're welcome to jump in and write one ;). It shouldn't actually be too tough, and I know the guys who run our GitHub repo (on the DSC Hub tab here) would likely be willing to help out if you get stuck.

November 7, 2014 at 7:26 am

Implementing that resource seems easy enough, but defining its use cases might be a bit tricky... should the DSC engine wait for the BITS transfer to complete before it returns from the Set-TargetResource? Or is it enough to kick off the asynchronous BITS job and allow the rest of the configuration to process? (Which would mean that the rest of the configuration cannot assume that the file transfer is done.) Most likely, both scenarios should be supported, with the behavior controlled by a parameter to the resource.

If it's asynchronous, then the Test-TargetResource and/or Set-TargetResource functions would need to be smart enough to detect that a copy job for the file is already in progress, and not create a new one.

November 7, 2014 at 8:13 am

I figured it would have to detect.

My problem is I have an 8gig file I need to move. and when it's on a T1 instead of 10Gbps the file resource chokes.