Geräte-Tab: Wipe-Aktion mit Benutzerdaten-Option, Suchfeld vergrößert

Wipe-Button mit eigenem Modal: Checkbox ob Benutzerdaten behalten werden
(keepUserData). Suchfeld auf max-width 600px vergrößert.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-08-12 14:34:38 +02:00
co-authored by Claude Sonnet 4.6
parent f94141dbe0
commit 337709b685
4 changed files with 80 additions and 5 deletions
+5 -1
View File
@@ -1622,7 +1622,7 @@ function Invoke-DeviceActionEndpoint {
if ($err) { return $err }
$action = [string]$Body.action
$allowed = @('syncDevice','rebootNow','remoteLock','collectDiagnostics','rotateBitLockerKeys','retire','autopilotReset')
$allowed = @('syncDevice','rebootNow','remoteLock','collectDiagnostics','rotateBitLockerKeys','retire','autopilotReset','wipe')
if ($action -notin $allowed) {
return @{ statusCode = 400; error = "Unbekannte Aktion: $action" }
}
@@ -1630,6 +1630,10 @@ function Invoke-DeviceActionEndpoint {
if ($action -eq 'autopilotReset') {
$uri = "https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/$DeviceId/wipe"
$bodyJson = '{"keepEnrollmentData":true,"keepUserData":false}'
} elseif ($action -eq 'wipe') {
$keepUserData = if ($Body.keepUserData) { 'true' } else { 'false' }
$uri = "https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/$DeviceId/wipe"
$bodyJson = "{""keepEnrollmentData"":false,""keepUserData"":$keepUserData}"
} else {
$uri = "https://graph.microsoft.com/v1.0/deviceManagement/managedDevices/$DeviceId/$action"
$bodyJson = '{}'