Showing posts with label Software Updates. Show all posts
Showing posts with label Software Updates. Show all posts

Friday, 18 April 2025

Managed software updates on Apple devices with Intune

We've been able to configure software update policies on iOS and macOS devices for a while, right. However this is new and different, released in March 2025 (Service release 2503). "Managed software updates" means something very specific. We can now configure devices to automatically update to the latest OS version using Apple Declarative device management.

Declarative device management (DDM) is an update to the existing protocol for device management that can be used in combination with the existing MDM protocol capabilities. It allows the device to asynchronously apply settings and report status back to the MDM solution without constant polling. This is ideal for performance and scalability.

To configure Managed software updates, navigate to Devices > Manage devices > Configuration > Create > New policy > choose iOS/iPadOS or macOS for platform > select Settings catalog for profile type.

Add the setting Declarative device management > Software Update Enforce Latest. 

You'll also see the "Software Update" and "Software Updates Settings" setting, more on them shortly.

We have three items to configure

  • Enforce Latest Software Update Version: If true, devices will upgrade to the latest OS version that is available for that device model. This uses the Software Update Enforcement configuration and will force devices to restart and install the update after the deadline passes.
  • Delay In Days: Specifies the number of days that should pass before a deadline is enforced. This delay is based on either the posting date of the new update when released by Apple, or when the policy is configured.
  • Install Time (optional): Specifies the local device time for when updates are enforced. This setting uses the 24-hour clock format where midnight is 00:00 and 11:59pm is 23:59. Ensure that you include the leading 0 on single digit hours. For example, 01:00, 02:00, 03:00.

The configuration in the screenshot will force an update of the device 1 day after Apple release an update, at no particular time. The device will always remain at the latest OS version. This is called an "automatic managed software updates policy".

If you select the Software Update setting in the settings picker, your options are different.

  • Details URL (optional): Enter a web page URL that has more information on the update. Typically, this URL is a web page hosted by your organization that users can select if they need organization-specific help with the update.
  • Target Build Version (optional): Enter the target build version to update the device to, like 20A242. The build version can include a supplemental version identifier, like 20A242a. If the build version you enter isn't consistent with the Target OS Version value you enter, then the Target OS Version value takes precedence.
  • Target Date Time: Select or manually enter the date and the time that specifies when to force the installation of the software update.
  • Target OS Version: Select or manually enter the target OS version to update the device to. This value is the OS version number, like 16.1. You can also include a supplemental version identifier, like 16.1.1.

This is called a "manual managed software updates policy" as you need to create a new one for every OS version you need to update to. You would use this policy if you are unsure about updating to the latest and greatest as soon as possible.

Remember Software Updates Setting in the Setting picker, what is that one about?.

This give us a single place to configure managed software updates. You may want to manage aspects of the software update process leading up to the enforcement of an update. Using this configuration, you can:

  • Require that an admin or standard user can perform updates on the device
  • Control how users can manually interact with software update settings like automatic download and install or the behavior of Rapid Security Responses
  • Hide updates from users for a specified time period
  • Suppress update notifications up to one hour before the enforcement deadline
  • Control whether users are allowed to update to the latest major update, latest minor update, or are offered both.

Precedence

Now that we have several places to configure updates for iOS and macOS devices, what happens when there is a conflict? Managed software updates (both automatic and manual) have precedence over other policies that configure software updates. If you configure managed software updates and also have other software update policies assigned, then it's possible the other update policies have no effect.

iOS/iPadOS precedence order:

  1. Managed software updates (Settings catalog > Declarative Device Management > Software Update)
  2. Update policies (Devices > Update policies for iOS/iPadOS)

macOS precedence order:

  1. Managed software updates (Settings catalog > Declarative Device Management > Software Update)
  2. Update policies (Devices > Update policies for macOS)
  3. Software updates (Settings catalog > System Updates > Software Update)

We have seen that you can create software update policies or managed software update policies for Apple devices in Intune. Both policy types can manage the install of software updates on devices. However, there are some differences between the two policy types. Microsoft have provided a table to help you decide which policy type to use.

I hope this helps you to understand the new "managed" policy type and how it differs from what we already had. Until next time.....

Tuesday, 14 November 2023

macOS management with Intune - software updates

Back to main macOS page

This blog post is about the traditional way to deploy software updates to macOS devices. I'll discuss declarative software updates in a later post. With declarative updates you can be selective about the update that you want to deploy.

Anyway, back to the job at hand, software updates. You can use Microsoft Intune to manage software updates for macOS devices that are enrolled as supervised devices. This feature applies to macOS 12 and later.

First I had to verify that my test device was supported. Yes, it's running macOS Monterey v12.6.1.

There are two ways to manage macOS software updates in Intune (excluding declarative updates). Lets have a look at them both.

  • Configuration profile
  • Update policy for macOS (this is the one I'll deploy)

First let's have a look at Configuration Profiles. Navigate to Devices > macOS > Configuration profiles. Select Create > New policy.

Select Templates as the profile type and choose Software Updates. Select Create.

Enter a name for the profile and click Next.

You are presented with options for Critical, Firmware, Configuration file, and All other updates (OS, built-in apps). You can also set the schedule for software updates installation.


You only have two options:

  • Not configured
  • Download and install

I like to use the second option (update policies for macOS) as this gives us more options. Let's have a look at that.

Select Devices > Update policies for macOS > Create profile.

Enter a name for the policy and click Next.

You are presented with options for Critical, Firmware, Configuration file, and All other updates (OS, built-in apps). Using this method, the following installation actions can be configured:

  • Download and install: Download or install the update, depending on the current state.
  • Download only: Download the software update without installing it.
  • Install immediately: Download the software update and trigger the restart countdown notification. This action is recommended for userless devices.
  • Notify only: Download the software update and notify the user through System Settings.
  • Install later: Download the software update and install it later. This action isn't available for major OS upgrades.

You also have scheduling options:

  • Update at next check-in: The update installs on the device the next time it checks in with Intune. This option is the simplest and has no extra configurations.
  • Update during scheduled time: You configure one or more windows of time. During these windows, the update installs upon check-in.
  • Update outside of scheduled time: You configure one or more windows of time. During these windows, updates don't install upon check-in.

Make your selections and click Next.

Assign the policy to a group of macOS devices.

Review your selections and click Create. Now wait for the magic to happen.

On the device we can see that there is a software update notification (under System Preferences). 

Clicking on that notification shows that macOS Monterey 12.7.1 is downloading.

After a while the device restarts.

We can see the all too familiar Apple.

The device has been upgraded to Monterey 12.7.1.

Click on the device > Software Updates in the Intune portal and we can now see that the device is up to date for all update categories.

Drill into the Other category to see the updates installed.

Sunday, 20 February 2022

Software updates issue - access denied

We encountered this problem recently on a customer site. The customer uses ConfigMgr to patch their Windows 10 estate. They've not had any major issues for quite some time but then the January CU for Windows 10 v1909 (KB5009545) started to fail with the Access is denied error (0x80070005).


We could see the error in the UpdatesHandler.log file.

WSUS update (92c58401-7a51-4e9d-9457-ca1a93c3e3d9) installation result = 0x80070005, Reboot State = NoReboot

Update execution failed.

But what did that mean? Nothing had changed so why all of a sudden was access denied? What specifically was being denied access?

We found the answer in the CBS.log file. CBS refers to Component-Based Servicing. Some components might be installed or uninstalled during Windows updates, and CBS.log is a file that includes details of these components. This file logs detailed information from your most recent Windows installed updates, and thus it can be used for troubleshooting issues related to your updates.

This log file is located in %windir%\Logs\CBS\ folder. There were several errors like this repeating over and over

2022-02-08 19:32:05, Info                  DPX    DpxMoveFileExW failed, source: \\?\C:\Windows\SoftwareDistribution\Download\55d2d88ec6c8540e1de4d959136d1809\inst\_Windows10.0-KB5009545-x64.cab_\$dpx$.tmp\4f76f8be37b84846a53e298df591e679.tmp, destination: \\?\C:\Windows\SoftwareDistribution\Download\55d2d88ec6c8540e1de4d959136d1809\inst\_Windows10.0-KB5009545-x64.cab_\amd64_microsoft-windows-e..-unifiedwritefilter_31bf3856ad364e35_10.0.18362.449_none_f216a3681960d832\r\uwfservicingscr.scr, hr 0x80070005

We could see similar issues using Procmon

8:51:31.2419935 PM  TiWorker.exe  10516  SetRenameInformationFile C:\Windows\SoftwareDistribution\Download\7998dad7da209654d66a9b53acb8a555\inst\_Windows10.0-KB5010345-x64.cab_\$dpx$.tmp\8bdd9ac34e21374c8fe95160faa8a43e.tmp        ACCESS DENIED            ReplaceIfExists: True, FileName: C:\Windows\SoftwareDistribution\Download\7998dad7da209654d66a9b53acb8a555\inst\_Windows10.0-KB5010345-x64.cab_\x86_microsoft-windows-photoscreensaver_31bf3856ad364e35_10.0.18362.1316_none_1d493b2302fc0b6b\r\photoscreensaver.scr

This error referred to TiWorker.exe which is the TrustedInstaller process and suggested that it did not have Full Control or Full Access to all the folders or sub-folders within the directory named SoftwareDistribution (C:\Windows\SoftwareDistribution). This didn't make much sense as nothing had changed in the environment.

We noticed that all the files that were blocked had a .SCR extension. These were screensaver files that were being updated by the January CU. Then we discovered that there was a McAfee access protection rule in place to block access to .SCR files. 


The fix was then straightforward. We excluded the TiWorker.exe process from the Block all SCR rule and the updates started to install.

I hope this helps if you find yourself in a similar situation. CBS logs and Procmon are your friends 😀

Until next time........


Friday, 11 December 2015

Inventory and CSI Agent

Back to Secunia menu

In order to have an effective third party patching solution you need to know what third party applications are on your computers. There are a number of ways to collect this inventory.

ConfigMgr Software Inventory
I'm not a real fan of software inventory in ConfigMgr. It doesn't gather the information from "Programs and Features" on your devices (ironically that is done by hardware inventory). Rather it just collects a lot of information about files on your systems. You have to configure the file extensions in advance. For me it causes a lot of unnecessary overhead for very little gain.

If you wish to use this method you must add the following file extensions to ConfigMgr software inventory.
*.exe
*.dll
*.ocx

Also the ConfigMgr server must have Internet access and be able to communicate with the Secunia cloud service using port 443.

Remote Scanning
This is OK for smaller networks but doesn't scale well to enterprises.


CSI Agent
This method requires that a small lightweight agent is installed on each computer. All computers will need Internet access and be able to communicate with the Secunia cloud service using port 443.This is the method we will use for this blog.

In the CSI Portal navigate to Patching > Agent Deployment.


Select "Create CSI Agent Package".


The Package Configuration wizard is launched. Enter a suitable name.


Make sure that you check the "Use Secunia Custom Naming" box. All third party updates will then have the Secunia name. You will be able to filter by Secunia and you will never exceed the vendor limit of your Software Update Point.


Choose the defaults. Remember that we will be publishing the package to WSUS.


The package has been created.....


.....and is available.

Now we must carry out some preparatory work in ConfigMgr. Open the Software Update Point properties.


Select "Create all WSUS reporting events".


Ensure "Security Updates" is selected.


For products note that we can currently only see Local Publisher and Microsoft.


Manually synchronize the updates.


Almost immediately you will see Secunia as an available option. Check the box.


In time the package will be available in ConfigMgr. This can take a while (almost an hour in this example).


Right click and choose to deploy the package.


Enter a suitable name for the deployment and choose the collection of devices.


This is a required deployment.


Choose as soon as possible.


A reboot is not required.




Select a deployment package.




Click Next to create the deployment.


Now you could wait until the normal updates cycles run. However I'm impatient so I've used the Now Micro Right click tools to immediately run the Software Updates Deployment Evaluation Cycle and the Machine Policy Retrieval and Evaluation Cycle. The agent now installs on the computers.


You can see scan results being reported in the CSI portal.


Detailed scan results.


See the insecure third party applications.


See the top 10 offenders. We will update these applications in the next blog in the series.

Until next time.....