diff --git a/samy.ps1 b/samy.ps1 index fdec021..ca9b817 100644 --- a/samy.ps1 +++ b/samy.ps1 @@ -2563,7 +2563,7 @@ function Install-DattoRMM { if ($FetchSites) { try { $sitesResp = Invoke-RestMethod -Uri "$ApiUrl/api/v2/account/sites" -Method Get -Headers $headers - $siteList = $sitesResp.sites | ForEach-Object { + $siteList = $sitesResp.sites | Sort-Object name | ForEach-Object { [PSCustomObject]@{ Name = $_.name; UID = $_.uid } } Write-LogHybrid "Fetched $($siteList.Count) sites." Success DattoRMM -LogToEvent