I noticed that when your Site is running in Native Mode you can run into problems with installing Software Updates via a Task Sequence. The first time that your are installing your computer with your Task Sequence there are no problems, but every time after that the Task Sequence will finish successful but doesn’t install any Software Updates. It looks like that it will use existing scan results of the client from the previous scan. So when there are already scan results of your client it will not rescan during your Task Sequence.
To work around this I use the following scripts (that I run before the step Install Software Updates in the Task Sequence):
- Initiate Software Updates Scan: http://msdn.microsoft.com/en-us/library/cc144313.aspx
actionNameToRun = “Software Updates Assignments Evaluation Cycle”Dim oCPAppletMgr
Set oCPAppletMgr = CreateObject(“CPApplet.CPAppletMgr”)Dim oClientActions
Set oClientActions = oCPAppletMgr.GetClientActions()‘Loop through the available client actions. Run the matching client action when it is found.
Dim oClientAction
For Each oClientAction In oClientActions
If oClientAction.Name = actionNameToRun Then
oClientAction.PerformAction
End If
Next - Refresh Compliance State: http://msdn.microsoft.com/en-us/library/cc146437.aspx
dim newCCMUpdatesStore
set newCCMUpdatesStore = CreateObject (“Microsoft.CCM.UpdatesStore”)
‘Refresh the server compliance state by running the RefreshServerComplianceState method.
newCCMUpdatesStore.RefreshServerComplianceState
The first script Initiate Software Updates Scan is to let the client check if it needs new updates and the second script Refresh Compliance State is to let the client report back to the server that it needs updates.
Note: It can also happen when you are trying to avoid obsolete clients by starting the Task Sequence via Run Advertised Program.
Discover more from All about Microsoft Intune
Subscribe to get the latest posts sent to your email.
This worked smoothly! Thank you for this! 🙂
are these batch files or .vbs or ? – sorry newbie question. How do I get them into my TS?
Hi Debi,
These are VBS-scripts. Create a package and use that during the task sequence.
Peter