From 9e4d6b91a95d27f53734304775d5aa68b705d09a Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Sun, 5 Jan 2025 00:37:48 -0500 Subject: [PATCH] Update SVSTaskGate.ps1 --- SVSTaskGate.ps1 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/SVSTaskGate.ps1 b/SVSTaskGate.ps1 index 1907070..e7776d8 100644 --- a/SVSTaskGate.ps1 +++ b/SVSTaskGate.ps1 @@ -864,8 +864,19 @@ try { } } - - + + + "/installrmm" { + if ($request.HttpMethod -eq "POST") { + # Parse the received JSON + $bodyStream = New-Object IO.StreamReader $request.InputStream + $body = $bodyStream.ReadToEnd() + $selectedSite = ConvertFrom-Json $body + Invoke-Expression $selectedSite.installRMMCommand + } + } + + <# "/installrmm" { if ($request.HttpMethod -eq "POST") { $bodyStream = New-Object IO.StreamReader $request.InputStream @@ -913,7 +924,7 @@ try { } } - +#> "/setSVSPowerplan" { if ($request.HttpMethod -eq "GET") {