Update StackMonkey.ps1

This commit is contained in:
2025-06-22 23:40:22 -04:00
parent 6e8a46d3c5
commit fabfeb947f

View File

@@ -39,12 +39,27 @@
.PARAMETER SaveCopy .PARAMETER SaveCopy
Switch to download the RMM installer executable during the headless DattoRMM install. Switch to download the RMM installer executable during the headless DattoRMM install.
.EXAMPLE
# One-liner to silently install DattoRMM via ScriptMonkey:
& ([ScriptBlock]::Create( (iwr 'https://sm.svstools.com/ScriptMonkey.ps1' -UseBasicParsing).Content )) `
-DattoApiUrl 'https://your-datto-api-url' `
-DattoApiKey 'yourKeyHere' `
-DattoApiSecretKey 'yourSecretHere' `
-SiteUID 'site-uid-value' `
-SiteName 'My Client Site' `
-InstallRMM `
-PushSiteVars
.EXAMPLE
& ([ScriptBlock]::Create( (iwr 'sm.svstools.ca').Content )) -SilentInstall
#> #>
function Invoke-ScriptMonkey {
#region ScriptMonkey run silently Entrypoint #region ScriptMonkey run silently Entrypoint
[CmdletBinding(DefaultParameterSetName='UI')] [CmdletBinding(DefaultParameterSetName='UI')]
param( param(
# ───────────────────────────────────────────────────────── # ─────────────────────────────────────────────────────────
# Toolkit-only mode # Toolkit-only mode
[Parameter(Mandatory,ParameterSetName='Toolkit')] [Parameter(Mandatory,ParameterSetName='Toolkit')]
@@ -80,9 +95,9 @@ param(
[Parameter(ParameterSetName='Datto')] [Parameter(ParameterSetName='Datto')]
[switch] $SaveCopy [switch] $SaveCopy
) )
switch ($PSCmdlet.ParameterSetName) { switch ($PSCmdlet.ParameterSetName) {
'Toolkit' { 'Toolkit' {
Write-LogHelper "Toolkit-only mode" Info Startup Write-LogHelper "Toolkit-only mode" Info Startup
Install-SVSMSP -InstallToolkit Install-SVSMSP -InstallToolkit
@@ -101,21 +116,16 @@ switch ($PSCmdlet.ParameterSetName) {
-SaveCopy:$SaveCopy -SaveCopy:$SaveCopy
return return
} }
}
} }
# If we got here, it's the UI set—launch browser + listener: # If we got here, it's the UI set—launch browser + listener:
# ——— UI fallback starts here ———
Write-LogHelper "Launching UI" Info Startup
<# oneliner to silently install DRMM
& ( [ScriptBlock]::Create( (iwr 'https://sm.svstools.com/ScriptMonkey.ps1' -UseBasicParsing).Content )) `
-DattoApiUrl 'https://your-datto-api-url' `
-DattoApiKey 'yourKeyHere' `
-DattoApiSecretKey 'yourSecretHere' `
-SiteUID 'site-uid-value' `
-SiteName 'My Client Site' `
-InstallRMM `
-PushSiteVars
#>
# STACK = Scripted Tooling for Automated Client Kickoff # STACK = Scripted Tooling for Automated Client Kickoff
# MONKEY = Module-based Onboarding & Next-step Kickoff Engine Yoke # MONKEY = Module-based Onboarding & Next-step Kickoff Engine Yoke