Hello,
I’m new to DSC, but have used other CM tools before. I’m trying to figure out how to best manage a few text files which I want to distribute to all of my DSC hosts. The text files will change periodically, so I need DSC to check them at every run. I’m using pull mode.
A good example is C:\Windows\system32\WindowsPowerShell\v1.0\profile.ps1
It’s a text file which I can host anywhere - on my DSC pull server and serve via HTTP or SMB share (or anywhere else that makes sense.)
I wrote examples using the DSC File Resource [1] and using xRemoteFile [2] fetching over HTTP. The first resource simply checks that the destination exists, and if it does, stops short - it doesn’t compare the two files. The second, xRemoteFile, uses caching to try and optimize and minimize use of HTTP requests - which means that it only detects if the file has been locally modified. It never re-checks the server for new content.
Is there a pre-existing module / method out there that I should be using for something like this? If not, I’m going to write one ![]()
Thanks,
Patrick
1: https://msdn.microsoft.com/en-us/powershell/dsc/fileresource
2: GitHub - dsccommunity/xPSDesiredStateConfiguration: DSC resources for configuring common operating systems features, files and settings.