Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Procedure Windows Update Config
<?xml version="1.0" encoding="utf-8"?>
<ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">
<Procedure name="Windows Update Config" treePres="3" id="903396851" folderId="882226466053275" treeFullPath="Configuration.Windows Features &amp; Services">
<Body description="Set the service to auto start, set &quot;do not check&quot; for updates (still allows them to be done), Set &quot;do not force reboot for updates&quot;, stop the existing service if it's running, start the service.&#xA;&#xA;Applies to Windows Update and dependencies (Background Intelligent Transfer Service &amp; DCOM Server Process Launcher).">
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="sc config wuauserv start= auto" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="sc config bits start= auto" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="sc config DcomLaunch start= auto" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="reg add &quot;HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update&quot; /v AUOptions /t REG_DWORD /d 1 /f" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="reg add &quot;HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update&quot; /v AUState /t REG_DWORD /d 7 /f" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="reg add &quot;HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU&quot; /v NoAutoUpdate /t REG_DWORD /d 1 /f" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="reg add &quot;HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU&quot; /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="sc stop wuauserv" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="sc start wuauserv" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="sc stop bits" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="sc start bits" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="sc stop DcomLaunch" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="sc start DcomLaunch" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
</Statement>
</Body>
</Procedure>
</ScriptExport>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.