Commit 5e63512
authored
feat(cli): add Find My Mac check to prevent script execution (#15)
Added a check for Find My Mac token in NVRAM to prevent script execution
if it's active.
<!-- Provide a general summary of your changes in the Title above -->
## 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.1 parent 48f539a commit 5e63512
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
0 commit comments