Author Posts

June 15, 2015 at 11:40 am

I'm trying to poplulate a directory on my servers using the File resource type, as follows:

File ToolsDir
Type = "Directory"
DestinationPath = $Node.ToolsDirDestinationPath
SourcePath = $Node.ToolsDirSourcePath
Ensure = "Present"
MatchSource = $True
Recurse = $True
Force = $True
Credential = $Credential
Checksum = "modifiedDate"

This works –but the performance is extremely poor, in that the client spends an inordinate amount of time 'building file list without using cache'.

Anyone know how to make the client use a cache, or to otherwise speed up this process?

Or maybe they've fixed this in WMF5?

Many Thanks.

June 15, 2015 at 11:47 am

Hard to say; the File resource is the only one written in native code, so we can't really see what's going on there.

I can tell you that the DSC cache folder is also automatically cleared every time a new version of the configuration is applied with Start-DscConfiguration, or when a new version is downloaded from the pull server. So the cache only really helps when the system is being checked for drift from an existing configuration.

June 15, 2015 at 4:48 pm

Thanks for the reply. I've removed this from my configuration for now.
I really need this to work, so I'm going to try write up a custom resource that simply uses robocopy mirroring if a checksum file differs in its content.