updated the synopsis
This commit is contained in:
@@ -17,55 +17,121 @@
|
|||||||
and optional silent install of the SVSMSP toolkit and headless DattoRMM deployment.
|
and optional silent install of the SVSMSP toolkit and headless DattoRMM deployment.
|
||||||
|
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Provides an HTTP-hosted GUI for selecting and running tasks (module installs, tweaks, offboarding, etc.).
|
Install-DattoRMM is a single, unified toolkit for Datto RMM operations. It can be used
|
||||||
When invoked with the correct parameters, it can silently install the SVSMSP toolkit and perform a headless
|
interactively or via HTTP endpoints, and includes built-in validation and error trapping.
|
||||||
DattoRMM deployment without ever launching the browser or UI.
|
|
||||||
|
|
||||||
.PARAMETER SilentInstall
|
Key features:
|
||||||
Runs only the SVSMSP module install (Install-Toolkit) and skips launching the browser/UI.
|
• Credential retrieval – securely fetches ApiUrl, ApiKey, and ApiSecretKey from a webhook.
|
||||||
|
• OAuth management – automatically acquires and refreshes bearer tokens over TLS.
|
||||||
|
• Site list fetching – returns the list of RMM sites; validates OutputFile to .csv or .json.
|
||||||
|
• Site list saving – writes fetched site list to the user’s Desktop as CSV or JSON.
|
||||||
|
• Registry variable push – writes site-specific variables under HKLM:\Software\SVS\Deployment.
|
||||||
|
• Agent download & install – downloads the Datto RMM agent installer and launches it.
|
||||||
|
• Installer archiving – saves a copy of the downloaded installer to C:\Temp.
|
||||||
|
• HTTP endpoints – exposes `/getpw` and `/installDattoRMM` handlers, each wrapped in try/catch
|
||||||
|
to log errors and return proper HTTP 500 responses on failure.
|
||||||
|
• Idempotent & WhatIf support – uses ShouldProcess for safe, testable agent installs.
|
||||||
|
|
||||||
.PARAMETER DattoApiUrl
|
Throughout, secrets are never written to logs or console, and all operations produce
|
||||||
The Datto Automate API base URL for headless deployment.
|
clear success/failure messages via Write-LogHybrid. ```
|
||||||
|
|
||||||
.PARAMETER DattoApiKey
|
|
||||||
Your Datto Automate API username.
|
|
||||||
|
|
||||||
.PARAMETER DattoApiSecretKey
|
.PARAMETER UseWebhook
|
||||||
Your Datto Automate API password/secret.
|
Switch that forces credential retrieval from the webhook at WebhookUrl using WebhookPassword.
|
||||||
|
When omitted, you must supply ApiUrl, ApiKey, and ApiSecretKey directly.
|
||||||
|
|
||||||
.PARAMETER SiteUID
|
.PARAMETER WebhookPassword
|
||||||
The target Datto site UID for headless installation.
|
Password to authenticate to the credentials-fetch webhook. Mandatory when -UseWebhook is set.
|
||||||
|
|
||||||
.PARAMETER SiteName
|
.PARAMETER WebhookUrl
|
||||||
The target Datto site name for headless installation.
|
URL of the credentials webhook endpoint. Defaults to $Global:DattoWebhookUrl.
|
||||||
|
|
||||||
|
.PARAMETER ApiUrl
|
||||||
|
Direct Datto RMM API base URL (used if not fetching from webhook).
|
||||||
|
|
||||||
|
.PARAMETER ApiKey
|
||||||
|
Direct Datto RMM API key (used if not fetching from webhook).
|
||||||
|
|
||||||
|
.PARAMETER ApiSecretKey
|
||||||
|
Direct Datto RMM secret (used if not fetching from webhook).
|
||||||
|
|
||||||
|
.PARAMETER FetchSites
|
||||||
|
Switch to fetch the list of RMM sites and skip all install or variable-push actions.
|
||||||
|
|
||||||
|
.PARAMETER SaveSitesList
|
||||||
|
Switch to save the fetched site list to the desktop as a file named by OutputFile.
|
||||||
|
Must be used together with -FetchSites.
|
||||||
|
|
||||||
|
.PARAMETER OutputFile
|
||||||
|
Name of the file to write the site list to (must end in “.csv” or “.json”).
|
||||||
|
Defaults to 'datto_sites.csv'.
|
||||||
|
|
||||||
.PARAMETER PushSiteVars
|
.PARAMETER PushSiteVars
|
||||||
Switch to include site variables in the headless DattoRMM install.
|
Switch to fetch site-specific variables and write them under HKLM:\Software\SVS\Deployment.
|
||||||
|
|
||||||
.PARAMETER InstallRMM
|
.PARAMETER InstallRMM
|
||||||
Switch to install the RMM agent in the headless DattoRMM install.
|
Switch to download and launch the Datto RMM agent installer for the specified site.
|
||||||
|
|
||||||
.PARAMETER SaveCopy
|
.PARAMETER SaveCopy
|
||||||
Switch to download the RMM installer executable during the headless DattoRMM install.
|
Switch to save a copy of the downloaded Datto RMM installer into C:\Temp.
|
||||||
|
|
||||||
|
.PARAMETER SiteUID
|
||||||
|
The unique identifier of the Datto RMM site. Mandatory when performing install or variable-push.
|
||||||
|
|
||||||
|
.PARAMETER SiteName
|
||||||
|
The friendly name of the Datto RMM site (used in logging). Mandatory when performing install or variable-push.
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
& ([ScriptBlock]::Create(
|
# Fetch and save site list via webhook
|
||||||
(iwr 'https://sm.svstools.com' -UseBasicParsing).Content
|
Install-DattoRMM -UseWebhook -WebhookPassword 'Tndmeeisdwge!' -FetchSites -SaveSitesList -OutputFile 'sites.csv'
|
||||||
)) `
|
|
||||||
-N8nPassword 'pwd' `
|
.EXAMPLE
|
||||||
-SiteUID 'site-123' `
|
# Headless install with site variables
|
||||||
-SiteName 'Acme Corp' `
|
Install-DattoRMM -ApiUrl 'https://api.example.com' -ApiKey 'KeyHere' -ApiSecretKey 'SecretHere' \
|
||||||
-InstallRMM `
|
-SiteUID 'site-123' -SiteName 'Acme Corp' -PushSiteVars -InstallRMM
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
# Download and save installer to C:\Temp without installing
|
||||||
|
Install-DattoRMM -ApiUrl 'https://api.example.com' -ApiKey 'KeyHere' -ApiSecretKey 'SecretHere' \
|
||||||
|
-SiteUID 'site-123' -SiteName 'Acme Corp' -SaveCopy
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
& ([ScriptBlock]::Create( (iwr 'https://sm.svstools.com' -UseBasicParsing).Content )) `
|
||||||
|
-UseWebhook `
|
||||||
|
-WebhookPassword 'pwd' `
|
||||||
|
-FetchSites `
|
||||||
|
-SaveSitesList `
|
||||||
|
-OutputFile 'sites.json'
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
& ([ScriptBlock]::Create( (iwr 'https://sm.svstools.com' -UseBasicParsing).Content )) `
|
||||||
|
-ApiUrl 'https://api.example.com' `
|
||||||
|
-ApiKey 'YourApiKey' `
|
||||||
|
-ApiSecretKey 'YourSecretKey' `
|
||||||
|
-SiteUID 'site-123' `
|
||||||
|
-SiteName 'Acme Corp' `
|
||||||
-PushSiteVars `
|
-PushSiteVars `
|
||||||
-SaveCopy `
|
-InstallRMM
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
& ([ScriptBlock]::Create( (iwr 'https://sm.svstools.com' -UseBasicParsing).Content )) `
|
||||||
|
-ApiUrl 'https://api.example.com' `
|
||||||
|
-ApiKey 'YourApiKey' `
|
||||||
|
-ApiSecretKey 'YourSecretKey' `
|
||||||
|
-SiteUID 'site-123' `
|
||||||
|
-SiteName 'Acme Corp' `
|
||||||
|
-SaveCopy
|
||||||
|
|
||||||
|
.EXAMPLE
|
||||||
|
& ([ScriptBlock]::Create( (iwr 'https://sm.svstools.com' -UseBasicParsing).Content )) `
|
||||||
|
-ApiUrl 'https://api.example.com' `
|
||||||
|
-ApiKey 'YourApiKey' `
|
||||||
|
-ApiSecretKey 'YourSecretKey' `
|
||||||
|
-SiteUID 'site-123' `
|
||||||
|
-SiteName 'Acme Corp' `
|
||||||
|
-InstallRMM `
|
||||||
-WhatIf
|
-WhatIf
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
& ([ScriptBlock]::Create( (iwr 'https://sm.svstools.com/ScriptMonkey.ps1' -UseBasicParsing).Content)) -N8nPassword '' -FetchSitesOnly -OutputFile ''
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
& ([ScriptBlock]::Create( (iwr 'https://sm.svstools.com/ScriptMonkey.ps1' -UseBasicParsing).Content )) -N8nPassword 's3cr3t' -FetchSitesOnly
|
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
& ([ScriptBlock]::Create((iwr 'sm.svstools.ca').Content )) -SilentInstall
|
& ([ScriptBlock]::Create((iwr 'sm.svstools.ca').Content )) -SilentInstall
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user