-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #233 from TheJumpCloud/MDMD-ResetExample
mdmreset
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# BEWARE any MDM enrollment profiles installed on JumpCloud systems will become invaid after deleting the MDM configuration | ||
# System will need to have the invalid enrollment profiles removed prior to installing a new MDM enrollment profile | ||
|
||
# To run unattended pass in the parameter -JumpCloudAPIKey in when calling the resetJCMDM.ps1 | ||
# Example ./resetJCMDM.ps1 -JumpCloudAPIKey "56b403784365r6o2n311cosr218u1762le4y9e9a" | ||
# Your JumpCloudAPIKey can be found on the drop down list under admin email in the top right corner of the admin console | ||
|
||
|
||
param ( | ||
$JumpCloudAPIKey | ||
) | ||
$URI = "https://console.jumpcloud.com/api/v2/applemdms" | ||
$hdrs = @{"X-API-KEY" = "$JumpCloudAPIKey" } | ||
$AppleMDM = Invoke-RestMethod -Method Get -Uri $URI -Headers $hdrs | ||
|
||
$CurrentMDMSettingURI = "https://console.jumpcloud.com/api/v2/applemdms/$($AppleMDM.id)" | ||
|
||
Invoke-RestMethod -Method Delete -Uri $CurrentMDMSettingURI -Headers $hdrs | ||
|
||
|
||
|
||
|