Update TGBeta.ps1

This commit is contained in:
2025-01-26 22:38:14 -05:00
parent 5820b82e9c
commit aeb5534974

View File

@@ -653,20 +653,20 @@ function GetHtmlContent {
<!-- Right column --> <!-- Right column -->
<div class="checkbox-group column" id="rightColumn" > <div class="checkbox-group column" id="rightColumn" >
<label> <label>
<input type="checkbox" class="right-checkbox" name="installtemp1" id="installtemp1Checkbox"> <input type="checkbox" class="right-checkbox" name="EnableBitLocker" id="installtemp1Checkbox">
Installtemp1 Enable Bitlocker
</label> </label>
<label> <label>
<input type="checkbox" class="right-checkbox" name="installtemp2" id="installtemp2Checkbox"> <input type="checkbox" class="right-checkbox" name="EdgeDefaultSearchEngine" id="installtemp2Checkbox">
Install temp2 Set Edge Default Search Engine
</label> </label>
<!-- Add more checkboxes here --> <!-- Add more checkboxes here -->
</div> </div>
</div> </div>
<div id="n8nPasswordContainer" style="display: none;"> <div id="n8nPasswordContainer" style="display: none;">
<label for="n8nPassword">Enter n8n Password:</label><br> <label for="n8nPassword">Enter Password:</label><br>
<input type="password" id="n8nPassword" class="password-input" placeholder="Enter N8N Password"> <input type="password" id="n8nPassword" class="password-input" placeholder="Enter Password">
</div> </div>
<br> <br>
<div id="DattoRMMContainer" style="display: none;"> <div id="DattoRMMContainer" style="display: none;">
@@ -1482,7 +1482,6 @@ try {
"/installSVSWatchtower" { "/installSVSWatchtower" {
if ($request.HttpMethod -eq "GET") { if ($request.HttpMethod -eq "GET") {
Install-SVSWatchtower
try { try {
Install-SVSWatchtower Install-SVSWatchtower
$responseString = "Install SVSWatchtower triggered successfully." $responseString = "Install SVSWatchtower triggered successfully."
@@ -1502,6 +1501,49 @@ try {
$response.OutputStream.Close() $response.OutputStream.Close()
} }
"/EdgeDefaultSearchEngine"
if ($request.HttpMethod -eq "GET") {
try {
Set-EdgeDefaultSearchEngine.ps1
$responseString = " Set Edge Default Search Engine triggered successfully."
$response.StatusCode = 200
} catch {
$responseString = "Error triggering Install SVSWatchtower: $_"
$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()
}
"/EnableBitLocker"
if ($request.HttpMethod -eq "GET") {
try {
Set-SVSBitLocker -Mode Enable -DriveLetter C -SaveToRegistry $true
$responseString = " Set Edge Default Search Engine triggered successfully."
$response.StatusCode = 200
} catch {
$responseString = "Error triggering Install SVSWatchtower: $_"
$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()
}
"/offboard" { "/offboard" {
if ($request.HttpMethod -eq "POST") { if ($request.HttpMethod -eq "POST") {
try { try {