File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ function New-CIPPDeviceAction {
99 $APINAME
1010 )
1111 try {
12+ if ($action -eq ' delete' ) {
13+ $null = New-Graphpostrequest - uri " https://graph.microsoft.com/beta/deviceManagement/managedDevices/$DeviceFilter " - type DELETE - tenantid $TenantFilter
14+ Write-LogMessage - headers $Headers - API $APINAME - tenant $TenantFilter - message " Queued $Action on $DeviceFilter " - Sev ' Info'
15+ return " Queued $Action on $DeviceFilter "
16+ }
1217 $null = New-Graphpostrequest - uri " https://graph.microsoft.com/beta/deviceManagement/managedDevices('$DeviceFilter ')/$ ( $Action ) " - type POST - tenantid $TenantFilter - body $ActionBody
1318 Write-LogMessage - headers $Headers - API $APINAME - tenant $TenantFilter - message " Queued $Action on $DeviceFilter " - Sev ' Info'
1419 return " Queued $Action on $DeviceFilter "
You can’t perform that action at this time.
0 commit comments