From b42828e946decc2b7f434dffb4bb2bf3fb918110 Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Thu, 29 May 2025 00:10:14 -0400 Subject: [PATCH] Update StackMonkey.ps1 --- StackMonkey.ps1 | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/StackMonkey.ps1 b/StackMonkey.ps1 index 243d523..4beddb6 100644 --- a/StackMonkey.ps1 +++ b/StackMonkey.ps1 @@ -31,9 +31,8 @@ $Port = 8082 $Global:Tasks = @( # On-Boarding, left column @{ Id='setSVSPowerplan'; Name='setSVSPowerplan'; Label='Set SVS Powerplan'; HandlerFn='Handle-setSVSPowerPlan'; Page='onboard'; Column='left' }, - @{ Id='installSVSMSPModule'; Name='installSVSMSPModule'; Label='Install SVSMSP Module'; HandlerFn='Install-SVSMSPModule'; Page='onboard'; Column='left' }, - @{ Id='installCyberQP'; Name='installCyberQP'; Label='Install CyberQP'; HandlerFn='Install-CyberQP'; Page='onboard'; Column='left' }, - @{ Id='installSplashtop'; Name='installSplashtop'; Label='Install Splashtop'; HandlerFn='Install-Splashtop'; Page='onboard'; Column='left' }, + @{ Id='installSVSMSPModule'; Name='installSVSMSPModule'; Label='Install SVSMSP Module'; HandlerFn='Handle-InstallSVSMSP'; Page='onboard'; Column='left' }, + @{ Id='installCyberQP'; Name='installCyberQP'; Label='Install CyberQP'; HandlerFn='Handle-InstallCyberQP'; Page='onboard'; Column='left' }, @{ Id='installSVSHelpDesk'; Name='installSVSHelpDesk'; Label='Install SVS HelpDesk'; HandlerFn='Install-SVSHelpDesk'; Page='onboard'; Column='left' }, @{ Id='installThreatLocker'; Name='installThreatLocker'; Label='Install ThreatLocker'; HandlerFn='Install-ThreatLocker'; Page='onboard'; Column='left' }, @{ Id='installRocketCyber'; Name='installRocketCyber'; Label='Install RocketCyber'; HandlerFn='Install-RocketCyber'; Page='onboard'; Column='left' }, @@ -358,9 +357,9 @@ function Handle-SetSVSPowerPlan { Respond-Text $Context "PowerPlan applied" } -function Install-SVSMSPModule { +function Handle-InstallSVSMSP { param($Context) - Write-LogHybrid "HTTP trigger: Install-SVSMSPModule" "Info" "OnBoard" + Write-LogHybrid "HTTP trigger: Handle-InstallSVSMSP" "Info" "OnBoard" try { Install-SVSMSP -InstallToolkit Respond-Text $Context "SVSMSP Module installed/updated." @@ -370,15 +369,26 @@ function Install-SVSMSPModule { } } -function Install-CyberQP { +function Handle-InstallCyberQP { param($Context) + + # 1) call into your module + Install-CyberQP + + # 2) log & write back a simple text response Write-LogHybrid "CyberQP installed" "Success" "OnBoard" Respond-Text $Context "CyberQP installed" } + + # Off-boarding handlers function Uninstall-CyberQP { param($Context) + + # 1) call into your module + Uninstall-CyberQP + Write-LogHybrid "CyberQP uninstalled" "Success" "OffBoard" Respond-Text $Context "CyberQP uninstalled" }