Update samy.ps1

This commit is contained in:
2025-11-30 23:28:21 -05:00
parent d1d500cb23
commit ede6721818

View File

@@ -1,4 +1,3 @@
<#
Last changes made should fix the issues we had wen running thi in Windows 11 25H2
@@ -787,7 +786,7 @@ if (-not [System.Diagnostics.EventLog]::SourceExists('$EventSource')) {
@{ Id='setSVSPowerplan'; Name='setSVSPowerplan'; Label='Set SVS Powerplan'; HandlerFn='Invoke-setSVSPowerPlan'; Page='onboard'; Column='left' },
@{ Id='installSVSMSPModule'; Name='installSVSMSPModule'; Label='Install SVSMSP Module'; HandlerFn='Invoke-InstallSVSMSP'; Page='onboard'; Column='left' },
@{ Id='installCyberQP'; Name='installCyberQP'; Label='Install CyberQP'; HandlerFn='Invoke-InstallCyberQP'; Page='onboard'; Column='left' },
@{ Id='installSVSHelpDesk'; Name='installSVSHelpDesk'; Label='Install SVS HelpDesk'; HandlerFn='Invoke-InstallSVSHelpDesk'; Page='onboard'; Column='left' },
@{ Id='installHelpDesk'; Name='installHelpDesk'; Label='Install HelpDesk'; HandlerFn='Invoke-InstallHelpDesk'; Page='onboard'; Column='left' },
@{ Id='installThreatLocker'; Name='installThreatLocker'; Label='Install ThreatLocker'; HandlerFn='Invoke-InstallThreatLocker'; Page='onboard'; Column='left' },
@{ Id='installRocketCyber'; Name='installRocketCyber'; Label='Install RocketCyber'; HandlerFn='Invoke-InstallRocketCyber'; Page='onboard'; Column='left' },
@{ Id='installDattoRMM'; Name='installDattoRMM'; Label='Install DattoRMM'; HandlerFn='Invoke-InstallDattoRMM'; Page='onboard'; Column='left';
@@ -805,7 +804,7 @@ if (-not [System.Diagnostics.EventLog]::SourceExists('$EventSource')) {
# Off-Boarding
@{ Id='offUninstallCyberQP'; Name='offUninstallCyberQP'; Label='Uninstall CyberQP'; HandlerFn='Invoke-UninstallCyberQP'; Page='offboard' },
@{ Id='offUninstallSVSHelpDesk'; Name='offUninstallSVSHelpDesk'; Label='Uninstall SVS HelpDesk'; HandlerFn='Invoke-UninstallSVSHelpDesk'; Page='offboard' },
@{ Id='offUninstallHelpDesk'; Name='offUninstallHelpDesk'; Label='Uninstall HelpDesk'; HandlerFn='Invoke-UninstallHelpDesk'; Page='offboard' },
@{ Id='offUninstallThreatLocker'; Name='offUninstallThreatLocker'; Label='Uninstall ThreatLocker'; HandlerFn='Invoke-UninstallThreatLocker'; Page='offboard' },
@{ Id='offUninstallRocketCyber'; Name='offUninstallRocketCyber'; Label='Uninstall RocketCyber'; HandlerFn='Invoke-UninstallRocketCyber'; Page='offboard' },
@{ Id='offCleanupSVSMSPModule'; Name='offCleanupSVSMSPModule'; Label='Cleanup SVSMSP Toolkit'; HandlerFn='Invoke-CleanupSVSMSP'; Page='offboard' },
@@ -1304,11 +1303,11 @@ function Send-JSON {
Send-Text $Context "RocketCyber installed"
}
function Invoke-InstallSVSHelpDesk {
function Invoke-InstallHelpDesk {
param($Context)
# 1) call into your module
Install-SVSHelpDesk
Install-HelpDesk
# 2) log & write back a simple text response
Write-LogHybrid "SVS HelpDesk installed" "Success" "OnBoard"
@@ -1414,16 +1413,16 @@ function Invoke-UninstallCyberQP {
}
}
function Invoke-UninstallSVSHelpDesk {
function Invoke-UninstallHelpDesk {
param($Context)
try {
if (Get-Command Uninstall-SVSHelpDesk -ErrorAction Stop) {
Uninstall-SVSHelpDesk
if (Get-Command Uninstall-HelpDesk -ErrorAction Stop) {
Uninstall-HelpDesk
Write-LogHybrid "SVS HelpDesk uninstalled" Success OffBoard -LogToEvent
Send-Text $Context "SVS HelpDesk uninstalled."
} else {
throw "Uninstall-SVSHelpDesk cmdlet not found in SVSMSP toolkit."
throw "Uninstall-HelpDesk cmdlet not found in SVSMSP toolkit."
}
}
catch {