Hi All,
I want to leverage the "system_profiler SPInstallHistoryDataType" command which will tell me all of the installed macOS updates. To do that I can add a pipe and grep the string "macOS". However I'm looking to get both the macOS update(s) that were installed and the Install Date when it happened into an Extension Attribute.
As an example, one of the results of the command is below:
macOS Mojave Security Update Developer Beta 2021-001:
Version: 10.14.6
Source: Apple
Install Date: 1/29/21, 9:11 AM
From the above text, I'm looking to only display what is below into the EA:
macOS Mojave Security Update Developer Beta 2021-001:
Install Date: 1/29/21, 9:11 AM
I'm not sure what what the command syntax will look like to get rid of the "middle" data from the result of the command. As you can imagine, the EA will continually update as new "macOS updates" get installed.
Thanks to anyone that can offer guidance.
