M1 macos12 inline update

tegus232
Contributor

Hi all,

 

Does anyone know a good script that allows us to auto push updates in background as a policy for macos12 inline on m1s?

 

The MDM commands aren't very consistent. We are giving end users upto 2 weeks to go to install from software update pane. But we want to be able to push these via Jamf where user is able to authenticate. we will have the required for admin to apply these updates.

7 REPLIES 7

gachowski
Valued Contributor II

I don't think Apple want's us to do that .. This would be the thread if you can. : ) 

Re: Enforcing Apple software updates in the year 2... - Page 5 - Jamf Nation Community - 231495

bwoods
Valued Contributor

tegus232
Contributor

Thank you for that @bwoods

 

Is there way to target a specific smart group with the script outlined@bwoods 

 

Do you recommend running through within jamf via policy or just run locally via terminal?

 

If you are performing via jamf, are you attaching script to a policy and scoping specific there? Just making sure I am following along

bwoods
Valued Contributor

@tegus232 , I use my function in combination with jamf helper script that allows users to defer updates. Once the maximum deferral limit has been reached, the function initializes the update. 

This can be scoped to any smart group because it targets the device individually. 

tegus232
Contributor

@bwoods 

 

Hi, 

 

Using the script provided in the post. the top most one you had posted initially. i get the following:

 

Script result: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 392 0 392 0 0 1534 0 --:--:-- --:--:-- --:--:-- 1574 eyJhbGciOiJIUzI1NiJ9.eyJhdXRoZW50aWNhdGVkLWFwcCI6IkdFTkVSSUMiLCJhdXRoZW50aWNhdGlvbi10eXBlIjoiSlNTIiwiZ3JvdXBzIjpbXSwic3ViamVjdC10eXBlIjoiSlNTX1VTRVJfSUQiLCJ0b2tlbi11dWlkIjoiYzdiY2QzZTktMDA1Yy00YmI0LWI0M2QtZmVkYjc2ZDMyOTA2IiwibGRhcC1zZXJ2ZXItaWQiOi0xLCJzdWIiOiIxNiIsImV4cCI6MTY1NDQ4OTM2NX0.PaVkAak3lPlCo-xdOEhjdc_KHQY-HT_ENDfDu3q2ARs -:10: parser error : Opening and ending tag mismatch: br line 8 and p </p> ^ -:11: parser error : Opening and ending tag mismatch: p line 8 and body </body> ^ -:12: parser error : Opening and ending tag mismatch: body line 5 and html </html> ^ -:13: parser error : Premature end of data in tag html line 1 ^ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 365 0 198 100 167 1292 1090 --:--:-- --:--:-- --:--:-- 2552 { "httpStatus" : 400, "errors" : [ { "code" : "INVALID_ID", "description" : "id field must be string of positive numeric value or -1", "id" : "", "field" : "deviceIds[0]" } ] } % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 391 0 391 0 0 2534 0 --:--:-- --:--:-- --:--:-- 2678 { "token" : "eyJhbGciOiJIUzI1NiJ9.eyJhdXRoZW50aWNhdGVkLWFwcCI6IkdFTkVSSUMiLCJhdXRoZW50aWNhdGlvbi10eXBlIjoiSlNTIiwiZ3JvdXBzIjpbXSwic3ViamVjdC10eXBlIjoiSlNTX1VTRVJfSUQiLCJ0b2tlbi11dWlkIjoiYzdiY2QzZTktMDA1Yy00YmI0LWI0M2QtZmVkYjc2ZDMyOTA2IiwibGRhcC1zZXJ2ZXItaWQiOi0xLCJzdWIiOiIxNiIsImV4cCI6MTY1NDQ4OTM2NX0.PaVkAak3lPlCo-xdOEhjdc_KHQY-HT_ENDfDu3q2ARs", "expires" : "2022-06-06T04:22:45.99Z" }

 

 

Can you tell me what could be the issue here?

tegus232
Contributor

ok seemed to be permissions issue. gave the account more right and got the following. let me know if this is expected.

i replace my company url with url 

Script result: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 392 0 392 0 0 1384 0 --:--:-- --:--:-- --:--:-- 1415 eyJhbGciOiJIUzI1NiJ9.eyJhdXRoZW50aWNhdGVkLWFwcCI6IkdFTkVSSUMiLCJhdXRoZW50aWNhdGlvbi10eXBlIjoiSlNTIiwiZ3JvdXBzIjpbXSwic3ViamVjdC10eXBlIjoiSlNTX1VTRVJfSUQiLCJ0b2tlbi11dWlkIjoiZjk2OWYwMzItMDhiOC00YWU3LTgwYjgtYjg4N2VhMDBkODRlIiwibGRhcC1zZXJ2ZXItaWQiOi0xLCJzdWIiOiIxNiIsImV4cCI6MTY1NDQ4OTUxOX0.giH8Hb89Xu0R85LP_3h3f5ueMGNQH3ghKlL9ElIrUCw 998 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 384 0 214 100 170 1020 810 --:--:-- --:--:-- --:--:-- 1920 { "responses" : [ { "id" : "f2d5b9df-b77c-4ffb-be93-7890e40c8765", "href" : "https://url.jamfcloud.com/url/api/v1/mdm/commands?uuids=f2d5b9df-b77c-4ffb-be93-7890e40c8765" } ], "errors" : [ ] } % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 392 0 392 0 0 2776 0 --:--:-- --:--:-- --:--:-- 2969 { "token" : "eyJhbGciOiJIUzI1NiJ9.eyJhdXRoZW50aWNhdGVkLWFwcCI6IkdFTkVSSUMiLCJhdXRoZW50aWNhdGlvbi10eXBlIjoiSlNTIiwiZ3JvdXBzIjpbXSwic3ViamVjdC10eXBlIjoiSlNTX1VTRVJfSUQiLCJ0b2tlbi11dWlkIjoiZjk2OWYwMzItMDhiOC00YWU3LTgwYjgtYjg4N2VhMDBkODRlIiwibGRhcC1zZXJ2ZXItaWQiOi0xLCJzdWIiOiIxNiIsImV4cCI6MTY1NDQ4OTUxOX0.giH8Hb89Xu0R85LP_3h3f5ueMGNQH3ghKlL9ElIrUCw", "expires" : "2022-06-06T04:25:19.897Z" }

tegus232
Contributor

ok looks like it has scheduledOSupdate in pending

 

question. if the machine has terminal and zoom etc open, will it quit out of those? reason i ask is with mdm commands it didn't which is why. I would like someone to be forced off which is why i ask. i will put constraints in so it doesn't execute the policy at certain time.