Skip to content

Commit 2198b45

Browse files
Merge pull request #3537 from Ren-Roros-Digital/mdmmethods
feat: readded MDM wipe methods
2 parents 17f20dc + d7f94b2 commit 2198b45

File tree

1 file changed

+137
-9
lines changed

1 file changed

+137
-9
lines changed

src/pages/endpoint/MEM/devices/index.js

Lines changed: 137 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,25 @@ import {
1212
Security,
1313
FindInPage,
1414
Shield,
15+
Archive,
16+
AutoMode,
17+
Recycling,
1518
} from "@mui/icons-material";
1619

1720
const Page = () => {
1821
const pageTitle = "Devices";
1922
const tenantFilter = useSettings().currentTenant;
2023

2124
const actions = [
25+
{
26+
label: "View in InTune",
27+
link: `https://intune.microsoft.com/${tenantFilter}/#view/Microsoft_Intune_Devices/DeviceSettingsMenuBlade/~/overview/mdmDeviceId/[id]`,
28+
color: "info",
29+
icon: <EyeIcon />,
30+
target: "_blank",
31+
multiPost: false,
32+
external: true,
33+
},
2234
{
2335
label: "Sync Device",
2436
type: "POST",
@@ -116,17 +128,133 @@ const Page = () => {
116128
GUID: "id",
117129
Action: "windowsDefenderUpdateSignatures",
118130
},
119-
confirmText:
120-
"Are you sure you want to update the Windows Defender signatures for this device?",
131+
confirmText: "Are you sure you want to update the Windows Defender signatures for this device?",
121132
},
122133
{
123-
label: "View in InTune",
124-
link: `https://intune.microsoft.com/${tenantFilter}/#view/Microsoft_Intune_Devices/DeviceSettingsMenuBlade/~/overview/mdmDeviceId/[id]`,
125-
color: "info",
126-
icon: <EyeIcon />,
127-
target: "_blank",
128-
multiPost: false,
129-
external: true,
134+
label: "Generate logs and ship to MEM",
135+
type: "POST",
136+
icon: <Archive />,
137+
url: "/api/ExecDeviceAction",
138+
data: {
139+
GUID: "id",
140+
Action: "CreateDeviceLogCollectionRequest",
141+
},
142+
confirmText: "Are you sure you want to generate logs and ship these to MEM?",
143+
},
144+
/*
145+
{
146+
label: "Rename device",
147+
type: "POST",
148+
icon: null,
149+
url: "/api/ExecDeviceAction",
150+
data: {
151+
GUID: "id",
152+
Action: "setDeviceName",
153+
},
154+
confirmText: "Enter the new name for the device",
155+
},
156+
*/
157+
{
158+
label: "Fresh Start (Remove user data)",
159+
type: "POST",
160+
icon: <RestartAlt />,
161+
url: "/api/ExecDeviceAction",
162+
data: {
163+
GUID: "id",
164+
Action: "cleanWindowsDevice",
165+
keepUserData: false,
166+
},
167+
confirmText: "Are you sure you want to Fresh Start this device?",
168+
},
169+
{
170+
label: "Fresh Start (Do not remove user data)",
171+
type: "POST",
172+
icon: <RestartAlt />,
173+
url: "/api/ExecDeviceAction",
174+
data: {
175+
GUID: "id",
176+
Action: "cleanWindowsDevice",
177+
keepUserData: true,
178+
},
179+
confirmText: "Are you sure you want to Fresh Start this device?",
180+
},
181+
{
182+
label: "Wipe Device, keep enrollment data",
183+
type: "POST",
184+
icon: <RestartAlt />,
185+
url: "/api/ExecDeviceAction",
186+
data: {
187+
GUID: "id",
188+
Action: "cleanWindowsDevice",
189+
keepUserData: false,
190+
keepEnrollmentData: true,
191+
},
192+
confirmText: "Are you sure you want to wipe this device, and retain enrollment data?",
193+
},
194+
{
195+
label: "Wipe Device, remove enrollment data",
196+
type: "POST",
197+
icon: <RestartAlt />,
198+
url: "/api/ExecDeviceAction",
199+
data: {
200+
GUID: "id",
201+
Action: "cleanWindowsDevice",
202+
keepUserData: false,
203+
keepEnrollmentData: false,
204+
},
205+
confirmText: "Are you sure you want to wipe this device, and remove enrollment data?",
206+
},
207+
{
208+
label: "Wipe Device, keep enrollment data, and continue at powerloss",
209+
type: "POST",
210+
icon: <RestartAlt />,
211+
url: "/api/ExecDeviceAction",
212+
data: {
213+
GUID: "id",
214+
Action: "cleanWindowsDevice",
215+
keepEnrollmentData: true,
216+
keepUserData: false,
217+
useProtectedWipe: true,
218+
},
219+
confirmText: "Are you sure you want to wipe this device? This will retain enrollment data. Continuing at powerloss may cause boot issues if wipe is interrupted.",
220+
},
221+
{
222+
label: "Wipe Device, remove enrollment data, and continue at powerloss",
223+
type: "POST",
224+
icon: <RestartAlt />,
225+
url: "/api/ExecDeviceAction",
226+
data: {
227+
GUID: "id",
228+
Action: "cleanWindowsDevice",
229+
keepEnrollmentData: false,
230+
keepUserData: false,
231+
useProtectedWipe: true,
232+
},
233+
confirmText: "Are you sure you want to wipe this device? This will also remove enrollment data. Continuing at powerloss may cause boot issues if wipe is interrupted.",
234+
},
235+
{
236+
label: "Autopilot Reset",
237+
type: "POST",
238+
icon: <AutoMode />,
239+
url: "/api/ExecDeviceAction",
240+
data: {
241+
GUID: "id",
242+
Action: "wipe",
243+
keepUserData: "false",
244+
keepEnrollmentData: "true",
245+
},
246+
confirmText: "Are you sure you want to Autopilot Reset this device?",
247+
},
248+
{
249+
label: "Retire device",
250+
type: "POST",
251+
icon: <Recycling />,
252+
url: "/api/ExecDeviceAction",
253+
data: {
254+
GUID: "id",
255+
Action: "retire",
256+
},
257+
confirmText: "Are you sure you want to retire this device?",
130258
},
131259
];
132260

0 commit comments

Comments
 (0)