File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed
Entrypoints/HTTP Functions/Endpoint/MEM Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -73,9 +73,9 @@ function Invoke-EditIntuneScript {
7373 }
7474 ' PATCH' {
7575 Push-OutputBinding - Name Response - Value ([HttpResponseContext ]@ {
76- StatusCode = [HttpStatusCode ]::BadRequest
77- Body = " Method $ ( $Request.Method ) is not supported."
78- })
76+ StatusCode = [HttpStatusCode ]::BadRequest
77+ Body = " Method $ ( $Request.Method ) is not supported."
78+ })
7979 }
8080 ' POST' {
8181 # Parse the script data to determine type
Original file line number Diff line number Diff line change @@ -35,12 +35,12 @@ function Invoke-RemoveIntuneScript {
3535 ' Linux' {
3636 " https://graph.microsoft.com/beta/deviceManagement/ConfigurationPolicies('$ ( $ID ) ')"
3737 }
38- Default { $null }
38+ default { $null }
3939 }
4040
4141 $null = New-GraphPOSTRequest - uri $URI - type DELETE - tenantid $TenantFilter
4242 $Result = " Deleted $ ( $ScriptType ) script $ ( $DisplayName ) with ID: $ ( $ID ) "
43- Write-LogMessage - headers $. Headers - API $APINAME - tenant $Tenant - message $Result - Sev ' Info'
43+ Write-LogMessage - headers $Headers - API $APINAME - tenant $Tenant - message $Result - Sev ' Info'
4444 $StatusCode = [HttpStatusCode ]::OK
4545 } catch {
4646 $ErrorMessage = Get-CippException - Exception $_
@@ -49,11 +49,10 @@ function Invoke-RemoveIntuneScript {
4949 $StatusCode = [HttpStatusCode ]::Forbidden
5050 }
5151
52- $body = [pscustomobject ]@ {' Results' = " $Result " }
5352 # Associate values to output bindings by calling 'Push-OutputBinding'.
5453 Push-OutputBinding - Name Response - Value ([HttpResponseContext ]@ {
5554 StatusCode = $StatusCode
56- Body = $body
55+ Body = @ { ' Results ' = " $Result " }
5756 })
5857
5958}
Original file line number Diff line number Diff line change 9191 "id" : " 9255e99d-faf5-445e-bbf7-cb71482737c4" ,
9292 "type" : " Role"
9393 },
94+ {
95+ "id" : " 8b9d79d0-ad75-4566-8619-f7500ecfcebe" ,
96+ "type" : " Scope"
97+ },
9498 {
9599 "id" : " 06a5fe6d-c49d-46a7-b082-56b1b14103c7" ,
96100 "type" : " Role"
You can’t perform that action at this time.
0 commit comments