Update StackMonkey.ps1
This commit is contained in:
@@ -1825,6 +1825,7 @@ function Install-DattoRMM {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<#
|
||||||
'UI' {
|
'UI' {
|
||||||
Write-LogHybrid "Starting ScriptMonkey UI on http://localhost:$Port/" Info Startup
|
Write-LogHybrid "Starting ScriptMonkey UI on http://localhost:$Port/" Info Startup
|
||||||
try {
|
try {
|
||||||
@@ -1839,7 +1840,25 @@ function Install-DattoRMM {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
#>
|
||||||
|
|
||||||
|
'UI' {
|
||||||
|
Write-LogHybrid "Starting ScriptMonkey UI on http://localhost:$Port/" Info Startup
|
||||||
|
|
||||||
|
# Fire-and-forget browser opener so Start-Server can block safely.
|
||||||
|
# Uses Edge if present; falls back to the default browser otherwise.
|
||||||
|
Start-Process powershell -WindowStyle Hidden -ArgumentList `
|
||||||
|
"-NoProfile -Command `"Start-Sleep -Milliseconds 300; `
|
||||||
|
if (Get-Command msedge.exe -ErrorAction SilentlyContinue) { `
|
||||||
|
Start-Process msedge.exe -ArgumentList '--app=http://localhost:$Port' `
|
||||||
|
} else { `
|
||||||
|
Start-Process 'http://localhost:$Port' `
|
||||||
|
}`" | Out-Null
|
||||||
|
|
||||||
|
# Now start the blocking listener loop
|
||||||
|
Start-Server
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion EntryPoint: Define Invoke-ScriptMonkey
|
#endregion EntryPoint: Define Invoke-ScriptMonkey
|
||||||
|
|||||||
Reference in New Issue
Block a user