Update samy.ps1

This commit is contained in:
2025-11-26 21:03:52 -05:00
parent 2a02b12e11
commit 0b54fee99d

View File

@@ -6,7 +6,7 @@
<#
.SYNOPSIS
ScriptMonkey - MSP client onboarding/offboarding toolkit with a user interface,
Script Automation Monkey - MSP client onboarding/offboarding toolkit with a user interface,
and optional silent install of the SVSMSP toolkit and headless DattoRMM deployment.
.DESCRIPTION
@@ -160,7 +160,7 @@ $ProgressPreference = 'SilentlyContinue'
$ConfirmPreference = 'None'
#endregion Safely bypass Restricted Execution Policy
function Invoke-ScriptMonkey {
function Invoke-ScriptAutomationMonkey {
# ─────────────────────────────────────────────────────────────────────────
# PARAMETERS + GLOBAL VARIABLES
@@ -424,7 +424,7 @@ $ConfirmPreference = 'None'
.SYNOPSIS
Standardized logging utility with console/file output and Windows Event Log support,
including one-time event source initialization and optional auto-elevated creation
of a custom log/source. (Fallback implementation for ScriptMonkey.)
of a custom log/source. (Fallback implementation for ScriptAutomationMonkey.)
.DESCRIPTION
Mirrors the SVSMSP toolkit Write-Log so that Write-LogHybrid can safely fall back
@@ -1087,7 +1087,7 @@ function Get-UIHtml {
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Script Monkey</title>
<title>Script Automation Monkey</title>
<link rel="icon" href="https://git.svstools.ca/SVS_Public_Repo/SAMY/raw/branch/main/SVS_Favicon.ico">
<style>
@@ -1787,7 +1787,7 @@ function Install-DattoRMM {
}
#endregion Dispatch-Request
#region EntryPoint: Define Invoke-ScriptMonkey
#region EntryPoint: Define Invoke-ScriptAutomationMonkey
# ─────────────────────────────────────────────────────────────────────────
# 3) MAIN LOGIC (Toolkit vs DattoFetch vs DattoInstall vs UI)
@@ -1850,11 +1850,11 @@ function Install-DattoRMM {
'UI' {
$url = "http://localhost:$Port/"
Write-LogHybrid "Starting ScriptMonkey UI on $url" Info Startup
Write-LogHybrid "Starting ScriptAutomationMonkey UI on $url" Info Startup
# Open the UI in a separate PowerShell job so Start-Server can block safely.
try {
Start-Job -Name 'OpenScriptMonkeyUI' -ScriptBlock {
Start-Job -Name 'OpenScriptAutomationMonkeyUI' -ScriptBlock {
param($u)
Start-Sleep -Milliseconds 300
try {
@@ -1878,7 +1878,7 @@ function Install-DattoRMM {
'UI' {
$url = "http://localhost:$Port/"
Write-LogHybrid "Starting ScriptMonkey UI on $url" Info Startup
Write-LogHybrid "Starting ScriptAutomationMonkey UI on $url" Info Startup
# Resolve Edge path explicitly (x86 first, then 64-bit, then PATH)
$edgeCandidates = @(
@@ -1892,7 +1892,7 @@ function Install-DattoRMM {
}
# Launch Edge (app mode) in a background job so Start-Server can block
Start-Job -Name 'OpenScriptMonkeyUI' -ScriptBlock {
Start-Job -Name 'OpenScriptAutomationMonkeyUI' -ScriptBlock {
param([string]$u, [string]$edge)
Start-Sleep -Milliseconds 400
try {
@@ -1912,7 +1912,7 @@ function Install-DattoRMM {
}
#endregion EntryPoint: Define Invoke-ScriptMonkey
#endregion EntryPoint: Define Invoke-ScriptAutomationMonkey
}
@@ -1921,7 +1921,7 @@ function Install-DattoRMM {
# dot-sourced, don't invoke
} elseif ($PSCommandPath) {
# script was saved and run directly
Invoke-ScriptMonkey @PSBoundParameters
Invoke-ScriptAutomationMonkey @PSBoundParameters
} else {
# iwr | iex fallback
if ($args.Count -gt 0) {
@@ -1939,9 +1939,9 @@ function Install-DattoRMM {
}
}
}
Invoke-ScriptMonkey @namedArgs
Invoke-ScriptAutomationMonkey @namedArgs
} else {
Invoke-ScriptMonkey
Invoke-ScriptAutomationMonkey
}
}