Skip to content

feat(cli): add Find My Mac check to prevent script execution#15

Merged
bsojka merged 2 commits into
Inetum-Poland:mainfrom
maumeerally:add-fmm-check
Mar 25, 2026
Merged

feat(cli): add Find My Mac check to prevent script execution#15
bsojka merged 2 commits into
Inetum-Poland:mainfrom
maumeerally:add-fmm-check

Conversation

@maumeerally

Copy link
Copy Markdown
Contributor

Added a check for Find My Mac token in NVRAM to prevent script execution if it's active.

Description

Added a check for Find My Mac token in NVRAM to prevent script execution if it's active.

Motivation and Context

A Mac cannot be added to ABM if Find My Mac is active - it will fail and potentially cause data loss on a Mac as it automatically reverts to a deactivated state (losing the SecureTokens and Volume Ownership - as they are tied to a Mac's activation state) when attempting to add the Mac to ABM.

How has this been tested?

Real life hardship.

Are there any related PR?

No

Types of changes

The change attempts to check if Find My Mac is active in the NVRAM and will abort the script with warning before any damage can be done.

Added a check for Find My Mac token in NVRAM to prevent script execution if it's active.
@maumeerally maumeerally requested a review from a team as a code owner March 11, 2026 16:03
@bsojka bsojka self-assigned this Mar 25, 2026
@bsojka bsojka added bumper:minor Minor version change feature New feature labels Mar 25, 2026
@bsojka bsojka changed the title Add Find My Mac check to prevent script execution feat(cli): add Find My Mac check to prevent script execution Mar 25, 2026
@bsojka

bsojka commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Thank you very much @maumeerally for highlighting this issue, and sincere apologies that it took this long for me to review it.

Investigating this turned out to be quite a rabbit hole — I spent many hours testing, repeatedly wiping a test device, enabling and disabling Activation Lock, and refining the script. As a result, I now have a more comprehensive update to both the script and documentation in progress.

While the NVRAM check you proposed may have limited applicability on newer Apple Silicon machines, it helped surface an important aspect of the problem that I had not covered in the initial release.
I’ll merge this PR in recognition of that contribution. Thanks again for your effort — it’s genuinely appreciated.

I’ll follow up with additional changes shortly.

I fixed a small formatting issue (shfmt) to get CI passing before merge.
@bsojka bsojka self-requested a review March 25, 2026 21:51
@bsojka bsojka merged commit 5e63512 into Inetum-Poland:main Mar 25, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown

🚀 [bumper] Bumped!
New version: v1.2.0 / v1.2 / v1 / latest
Changes: v1.1.2...v1.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bumper:minor Minor version change feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants