File resource replacing files after changes are made

Welcome Forums DSC (Desired State Configuration) File resource replacing files after changes are made

This topic contains 1 reply, has 2 voices, and was last updated by

 
Keymaster
6 months, 2 weeks ago.

  • Author
    Posts
  • #97968

    Participant
    Points: 0
    Rank: Member

    I've been playing around with custom lock screens for a bit and I can't seem to get DSC to update the file each time I replace the backgroundDefault file in the C:\windows\system32\oobe\info\backgrounds directory. I had about a 80% success rate on deploying this to around 200 users.

    Registry 'ScreenLock'
            {
                Ensure    = ”Present”
                Key       = ”HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background”
                ValueName = 'OEMBackground'
                ValueType = ”DWord”
                ValueData = ”1”
            }
            File 'Screens'
            {
                SourcePath      = '\\x\x\backgroundDefault.jpg'
                DestinationPath = 'C:\Windows\System32\Oobe\info\backgrounds\backgroundDefault.jpg'
                Recurse         = $True
                Type            = 'File'
                MatchSource     = $True
                Ensure          = 'Present'
                Force           = $True
            }
    
  • #98085

    Keymaster
    Points: 1
    Rank: Member

    Have you scoured through the DSC logs on nodes that aren't working, too see if you're getting any useful information? It's a little hard to debug just from the configuration script.

The topic ‘File resource replacing files after changes are made’ is closed to new replies.