Update TGBeta.ps1
This commit is contained in:
33
TGBeta.ps1
33
TGBeta.ps1
@@ -4,13 +4,11 @@
|
|||||||
### need RGB color codes form john
|
### need RGB color codes form john
|
||||||
### add the .net silent install tweaks to toolkit
|
### add the .net silent install tweaks to toolkit
|
||||||
### for the reg tweak need to do/undo function maybe it should have it own check box list
|
### for the reg tweak need to do/undo function maybe it should have it own check box list
|
||||||
### line 1502 need to proper command to uninstall svsmsp module
|
|
||||||
|
|
||||||
|
|
||||||
# changes
|
# changes
|
||||||
## tag line color
|
## tag line color
|
||||||
## added offboard check boxes for dattormm, dattodeb, rocketcyber, cyberQP, SVSWatchtower, SVSHelpdesk and Splashtop
|
## added offboard check boxes for dattormm, dattodeb, rocketcyber, cyberQP, SVSWatchtower, SVSHelpdesk and Splashtop
|
||||||
##
|
|
||||||
|
|
||||||
|
|
||||||
#region Write-Log
|
#region Write-Log
|
||||||
@@ -645,7 +643,7 @@ function GetHtmlContent {
|
|||||||
<input type="checkbox" name="dattoRMMOption" value="exe">
|
<input type="checkbox" name="dattoRMMOption" value="exe">
|
||||||
Download.exe
|
Download.exe
|
||||||
</label>
|
</label>
|
||||||
|
<br><br>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -847,31 +845,9 @@ function GetHtmlContent {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function triggerOffboard() {
|
function triggerOffboard() {
|
||||||
const checkedCheckboxes = document
|
appendLog("testeteteteteteet")
|
||||||
.querySelectorAll('#offboardTab input[type="checkbox"]:checked');
|
|
||||||
|
|
||||||
const selectedTasks = Array.from(checkedCheckboxes).map(checkbox => checkbox.name);
|
|
||||||
|
|
||||||
if (selectedTasks.length === 0) {
|
|
||||||
appendLog("No offboarding tasks selected.", "yellow");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedTasks.forEach(task => {
|
|
||||||
fetch(`/offboard/${task}`, { method: 'GET' })
|
|
||||||
.then(response => {
|
|
||||||
if (!response.ok) {
|
|
||||||
throw new Error(`Failed to run task: ${task}`);
|
|
||||||
}
|
|
||||||
appendLog(`Successfully ran offboarding task: ${task}`, "green");
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
appendLog(`Error running offboarding task ${task}: ${error.message}`, "red");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function toggleTweaksCheckboxes(selectAllCheckbox) {
|
function toggleTweaksCheckboxes(selectAllCheckbox) {
|
||||||
// Get all checkboxes inside the tweaksTab container
|
// Get all checkboxes inside the tweaksTab container
|
||||||
const checkboxes = document
|
const checkboxes = document
|
||||||
@@ -1498,9 +1474,6 @@ try {
|
|||||||
$response.OutputStream.Close()
|
$response.OutputStream.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"/runTweaks" {
|
"/runTweaks" {
|
||||||
if ($request.HttpMethod -eq "POST") {
|
if ($request.HttpMethod -eq "POST") {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user