From 0b049c8be51deaaba1b740c54479efb953fc781d Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Mon, 30 Jun 2025 00:02:17 -0400 Subject: [PATCH] change save path --- StackMonkey.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/StackMonkey.ps1 b/StackMonkey.ps1 index 34ed49d..14821d5 100644 --- a/StackMonkey.ps1 +++ b/StackMonkey.ps1 @@ -1372,7 +1372,10 @@ $script $sites = Get-DattoRmmSites -Password $N8nPassword if ($SaveSitesOnly) { - # If SaveSitesOnly is true, save the output to a file + # If SaveSitesOnly is true, save the output to a file on desktop + $desktopPath = [System.Environment]::GetFolderPath('Desktop') + $filePath = Join-Path -Path $desktopPath -ChildPath $OutputFile + $ext = [IO.Path]::GetExtension($OutputFile).ToLower() if ($ext -eq '.json') { $sites | ConvertTo-Json -Depth 3 | Out-File -FilePath $OutputFile -Encoding UTF8 @@ -1381,6 +1384,8 @@ $script } Write-LogHybrid "Wrote $($sites.Count) sites to $OutputFile" Success DattoAuth + # Open the folder containing the file + Start-Process explorer.exe /select,"$filePath" } else { # If SaveSitesOnly is not true, just fetch sites (for UI purposes or silent mode without saving) Write-LogHybrid "Sites fetched successfully, but not saved." Success DattoAuth