Update SVSTaskGate.ps1
This commit is contained in:
@@ -867,6 +867,39 @@ try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"/installsvsmspmodule" {
|
||||||
|
if ($request.HttpMethod -eq "GET") {
|
||||||
|
try {
|
||||||
|
Write-LogHybrid -Message "Installing SVSMSP Module..." -Level "Info"
|
||||||
|
|
||||||
|
# Add your installation logic here
|
||||||
|
Install-Module -Name SVSMSP -Force -Scope AllUsers
|
||||||
|
|
||||||
|
Write-LogHybrid -Message "SVSMSP Module installed successfully." -Level "Success"
|
||||||
|
|
||||||
|
$responseString = "SVSMSP Module installation completed."
|
||||||
|
$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()
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
Write-LogHybrid -Message "Error installing SVSMSP Module: $($_.Exception.Message)" -Level "Error"
|
||||||
|
|
||||||
|
$response.StatusCode = 500
|
||||||
|
$responseString = "Failed to install SVSMSP Module."
|
||||||
|
$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" {
|
"/installrmm" {
|
||||||
if ($request.HttpMethod -eq "POST") {
|
if ($request.HttpMethod -eq "POST") {
|
||||||
$bodyStream = New-Object IO.StreamReader $request.InputStream
|
$bodyStream = New-Object IO.StreamReader $request.InputStream
|
||||||
|
|||||||
Reference in New Issue
Block a user