"Windows Update" service Startup Type is changed to "Disable" everytime

14 views
Skip to first unread message

Amrit Atmajit

unread,
Sep 30, 2017, 1:52:30 PM9/30/17
to Puppet Users
Hi,

I'm using puppet agent 1.7.0. I'm trying to update the Startup Type and Status of "Windows Update" service as Manual and Stopped respectively in the host machines.
To do so, I'm using the following resource type.

    service { 'WindowsUpdate':
     name       => 'wuauserv',
     ensure     => 'false',
     enable     => 'manual'
    }

Even, I've used the following resource type to do so.

    exec { 'Windows_Update':
      path  => 'C:/Windows/System32/WindowsPowerShell/v1.0',
      command => 'powershell.exe -ExecutionPolicy Unrestricted -command "Set-Service wuauserv -startuptype "manual" -status "Stopped"',
      logoutput => 'on_failure',
      require => [ File['C:/PuppetSWT/windows_update_service.ps1'] ],
    }

But, on execution "puppet agent -t" in the agent machine, the Startup Type and Status of "Windows Update" service is changed to "Disable" and "Stopped".

Then, I disabled the above catalog for that agent machine and manually changed service Startup Type to "Manual" but, on execution of "puppet agent -t" it's changing to "Disable" again.

I don't have a clue why this is happening so. Can anybody help on this?

Thanks,
Amrit 

Reply all
Reply to author
Forward
0 new messages