added silent DattoRMM install

This commit is contained in:
2025-06-22 16:18:48 -04:00
parent 30d759b26e
commit 422491b7ee

View File

@@ -8,8 +8,43 @@
[CmdletBinding()]
param(
[switch]$SilentInstall
[string]$DattoApiUrl,
[string]$DattoApiKey,
[string]$DattoApiSecretKey,
[string]$SiteUID,
[string]$SiteName,
[switch]$PushSiteVars,
[switch]$InstallRMM,
[switch]$SaveCopy
)
# If full-UI is disabled but we got all Datto params, run install and exit
if ($DattoApiUrl -and $DattoApiKey -and $DattoApiSecretKey -and $SiteUID -and $SiteName) {
Write-LogHelper -Message "Headless DattoRMM deploy" -Level Info -TaskCategory "Startup"
Install-DattoRMM-Helper `
-ApiUrl $DattoApiUrl `
-ApiKey $DattoApiKey `
-ApiSecretKey $DattoApiSecretKey `
-SiteUID $SiteUID `
-SiteName $SiteName `
-PushSiteVars:$PushSiteVars `
-InstallRMM:$InstallRMM `
-SaveCopy:$SaveCopy
return
}
<# 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
#>
# If the user asked for a silent install, do just that and quit
if ($SilentInstall) {
Write-LogHelper -Message "Silent install requested" -Level Info -TaskCategory "Startup"
@@ -17,15 +52,14 @@ if ($SilentInstall) {
return
}
## To use the silent install of the SVSMSP module
## & ([ScriptBlock]::Create( (iwr 'sm.svstools.ca').Content )) -SilentInstall
#endregion
# STACK = Scripted Tooling for Automated Client Kickoff
# MONKEY = Module-based Onboarding & Next-step Kickoff Engine Yoke
# Conveys the idea of coupling tasks together and keeping them under control.
#region Config & Task Definitions
# Listening port for HTTP UI
@@ -1251,12 +1285,14 @@ function Start-Server {
#endregion
# Only launch UI if not in silent mode
if (-not $SilentInstall) {
# open browser on whatever port you've set
Start-Process "msedge.exe" -ArgumentList "--app=http://localhost:$Port"
# now start your server (this will block until you hit Exit in the UI)
Start-Server
}
#endregion
# open browser on whatever port you've set
#Start-Process "msedge.exe" -ArgumentList "--app=http://localhost:$Port"
# now start your server (this will block until you hit Exit in the UI)
#Start-Server