From c36daddcb2aef4f4f0a376dda678825bde029aee Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Tue, 28 Jan 2025 00:28:13 -0500 Subject: [PATCH] Update TGBeta.ps1 --- TGBeta.ps1 | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/TGBeta.ps1 b/TGBeta.ps1 index a8dba20..11885c3 100644 --- a/TGBeta.ps1 +++ b/TGBeta.ps1 @@ -217,45 +217,10 @@ function Install-DattoRMM-Helper { } } } - -# Add below or near Install-DattoRMM-Helper -function Fetch-Sites { - param ( - [string]$ApiUrl = "https://example.com/api/sites", # Replace with your actual API URL - [string]$ApiKey = "YourAPIKey", # Replace with your actual API Key - [string]$ApiSecretKey = "YourSecretKey" # Replace with your actual Secret Key - ) - - # Check if Install-DattoRMM exists - if (-not (Get-Command -Name Install-DattoRMM -CommandType Function -ErrorAction SilentlyContinue)) { - Write-Host "Install-DattoRMM function not found. Using helper function." -ForegroundColor Yellow - - # Use the helper function - $sites = Install-DattoRMM-Helper -ApiUrl $ApiUrl -ApiKey $ApiKey -ApiSecretKey $ApiSecretKey -FetchSitesOnly - } - else { - Write-Host "Using the existing Install-DattoRMM function." -ForegroundColor Green - - # Use the existing function - $sites = Install-DattoRMM -ApiUrl $ApiUrl -ApiKey $ApiKey -ApiSecretKey $ApiSecretKey -FetchSitesOnly - } - - # Handle the fetched sites - if ($sites) { - Write-Host "Fetched Sites:" -ForegroundColor Cyan - $sites | ForEach-Object { - Write-Host "Site Name: $($_.Name), Site UID: $($_.UID)" - } - } - else { - Write-Host "Failed to fetch sites. Please check your API credentials or connection." -ForegroundColor Red - } -} - - - #endregion + + #region SVS Module function Install-SVSMSP {