added silent DattoRMM install
This commit is contained in:
@@ -8,8 +8,43 @@
|
|||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param(
|
param(
|
||||||
[switch]$SilentInstall
|
[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 the user asked for a silent install, do just that and quit
|
||||||
if ($SilentInstall) {
|
if ($SilentInstall) {
|
||||||
Write-LogHelper -Message "Silent install requested" -Level Info -TaskCategory "Startup"
|
Write-LogHelper -Message "Silent install requested" -Level Info -TaskCategory "Startup"
|
||||||
@@ -17,15 +52,14 @@ if ($SilentInstall) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
## To use the silent install of the SVSMSP module
|
|
||||||
## & ([ScriptBlock]::Create( (iwr 'sm.svstools.ca').Content )) -SilentInstall
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
# 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
|
||||||
# Conveys the idea of coupling tasks together and keeping them under control.
|
# Conveys the idea of coupling tasks together and keeping them under control.
|
||||||
|
|
||||||
|
|
||||||
#region Config & Task Definitions
|
#region Config & Task Definitions
|
||||||
|
|
||||||
# Listening port for HTTP UI
|
# Listening port for HTTP UI
|
||||||
@@ -1251,12 +1285,14 @@ function Start-Server {
|
|||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
# Only launch UI if not in silent mode
|
# Only launch UI if not in silent mode
|
||||||
if (-not $SilentInstall) {
|
if (-not $SilentInstall) {
|
||||||
# open browser on whatever port you've set
|
|
||||||
Start-Process "msedge.exe" -ArgumentList "--app=http://localhost:$Port"
|
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
|
Start-Server
|
||||||
}
|
}
|
||||||
#endregion
|
#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
|
||||||
|
|||||||
Reference in New Issue
Block a user