Update SM.ps1
This commit is contained in:
37
SM.ps1
37
SM.ps1
@@ -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"
|
||||
@@ -23,6 +58,8 @@ if ($SilentInstall) {
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user