diff --git a/TGBeta.ps1 b/TGBeta.ps1 index a29aa22..c3c6e5c 100644 --- a/TGBeta.ps1 +++ b/TGBeta.ps1 @@ -1,7 +1,7 @@ ### Known issues as of January 5 2025 +### update module before testing the script again ### Install-DattoRMM version 25.1.4 is missing functions you'll need version 25.1.5 - ### Missing Function in module, are added in 25.1.5 ### Install-SVSHelpDesk ### Install SVSWatchtower @@ -956,7 +956,27 @@ try { } } - + "/installSVSMSPModule" { + if ($request.HttpMethod -eq "GET") { + try { + Install-SVSMSP -InstallToolkit + $responseString = "Install SVSMSP Module triggered successfully." + $response.StatusCode = 200 + } catch { + $responseString = "Error triggering Install SVSMSP Module: $_" + $response.StatusCode = 500 + } + } else { + $responseString = "Method not allowed. Use GET." + $response.StatusCode = 405 + } + $buffer = [System.Text.Encoding]::UTF8.GetBytes($responseString) + $response.ContentType = "text/plain" + $response.ContentLength64 = $buffer.Length + $response.OutputStream.Write($buffer, 0, $buffer.Length) + $response.OutputStream.Close() + + } "/installrmm" { if ($request.HttpMethod -eq "POST") {