Update SVSTaskGate.ps1
This commit is contained in:
@@ -919,25 +919,7 @@ try {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Construct the command
|
|
||||||
$installCommand = "Install-DattoRMM -ApiUrl '$ApiUrl' -ApiKey '$ApiKey' -ApiSecretKey '$ApiSecretKey'"
|
|
||||||
Write-LogHybrid -Message "Executing command: $installCommand" -Level "Info"
|
|
||||||
|
|
||||||
try {
|
|
||||||
Invoke-Expression $installCommand
|
|
||||||
$responseString = "RMM install triggered successfully."
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
$responseString = "Error triggering RMM install: $($_.Exception.Message)"
|
|
||||||
}
|
|
||||||
|
|
||||||
$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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user