From 76777b2826a7b1454c78f2b353cd944ab2ff48f4 Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Sun, 29 Jun 2025 03:21:26 -0400 Subject: [PATCH] Update StackMonkey.ps1 --- StackMonkey.ps1 | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/StackMonkey.ps1 b/StackMonkey.ps1 index 3812828..11ce810 100644 --- a/StackMonkey.ps1 +++ b/StackMonkey.ps1 @@ -282,7 +282,7 @@ function Write-LogHybrid { #endregion # ───────────────────────────────────────────────────────────────────────── -# 3) MAIN LOGIC (Toolkit vs Datto vs UI) +# 3) MAIN LOGIC (Toolkit vs DattoFetch vs DattoInstall vs UI) # ───────────────────────────────────────────────────────────────────────── switch ($PSCmdlet.ParameterSetName) { @@ -292,29 +292,6 @@ function Write-LogHybrid { return } - 'Datto' { - Write-LogHybrid "Headless DattoRMM deploy (via n8n)" Info Startup -try{ - # ──────────────────────────────────────────── - # 1) Fetch URL, Key & Secret from n8n webhook - # ──────────────────────────────────────────── - - # 1) Fetch creds - $creds = Get-DattoApiCredentials -Password $N8nPassword - if (-not $creds) { throw "Could not fetch creds" } - - # 2) Store in globals for everyone else - $Global:ApiUrl = $creds.ApiUrl - $Global:ApiKey = $creds.ApiKey - $Global:ApiSecretKey = $creds.ApiSecretKey - - Write-LogHybrid "Fetched Datto API credentials from n8n" Success DattoAuth - } - catch { - Write-LogHybrid "N8N credential fetch error: $($_.Exception.Message)" Error DattoAuth - throw - } - # ─────────────────────────────────────────────────────────── # 2) If user only wants the site list, do that and exit # ─────────────────────────────────────────────────────────── @@ -334,8 +311,6 @@ try{ return } - - # ──────────────────────────────────────────── # 3) Invoke the existing Install-DattoRMM cmdlet # ────────────────────────────────────────────