File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Endpoint/MEM Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,19 @@ Function Invoke-ExecDeviceAction {
2020 if ($Request.Query.Action -eq ' setDeviceName' ) {
2121 $ActionBody = @ { deviceName = $Request.Body.input } | ConvertTo-Json - Compress
2222 }
23- $ActionResult = New-CIPPDeviceAction - Action $Request.Query.Action - ActionBody $ActionBody - DeviceFilter $Request.Query.GUID - TenantFilter $Request.Query.TenantFilter - ExecutingUser $request.headers .' x-ms-client-principal' - APINAME $APINAME
23+ else {
24+ $ActionBody = $Request.Body | ConvertTo-Json - Compress
25+ }
26+
27+ $cmdparams = @ {
28+ Action = $Request.Query.Action
29+ ActionBody = $ActionBody
30+ DeviceFilter = $Request.Query.GUID
31+ TenantFilter = $Request.Query.TenantFilter
32+ ExecutingUser = $request.headers .' x-ms-client-principal'
33+ APINAME = $APINAME
34+ }
35+ $ActionResult = New-CIPPDeviceAction @cmdparams
2436 $body = [pscustomobject ]@ {' Results' = " $ActionResult " }
2537
2638 } catch {
You can’t perform that action at this time.
0 commit comments