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
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
#>
#region ScriptMonkey run silently Entrypoint
[CmdletBinding(DefaultParameterSetName='UI')]
param(
function Invoke-ScriptMonkey {
#region ScriptMonkey run silently Entrypoint
[CmdletBinding(DefaultParameterSetName='UI')]
param(
# ─────────────────────────────────────────────────────────
# Toolkit-only mode
[Parameter(Mandatory,ParameterSetName='Toolkit')]
@@ -80,9 +95,9 @@ param(
[Parameter(ParameterSetName='Datto')]
[switch] $SaveCopy
)
)
switch ($PSCmdlet.ParameterSetName) {
switch ($PSCmdlet.ParameterSetName) {
'Toolkit' {
Write-LogHelper "Toolkit-only mode" Info Startup
Install-SVSMSP -InstallToolkit
@@ -101,21 +116,16 @@ switch ($PSCmdlet.ParameterSetName) {
-SaveCopy:$SaveCopy
return
}
}
}
# 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
# MONKEY = Module-based Onboarding & Next-step Kickoff Engine Yoke