From 561b44d4ee85f97561afe83c01d4f72846033d4a Mon Sep 17 00:00:00 2001 From: eeckert Date: Thu, 10 Aug 2023 11:54:59 -0600 Subject: [PATCH] update to use Debug Flag. --- Download-SnapperReports.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Download-SnapperReports.ps1 b/Download-SnapperReports.ps1 index 118572a..c9075ea 100644 --- a/Download-SnapperReports.ps1 +++ b/Download-SnapperReports.ps1 @@ -23,7 +23,7 @@ do { $project_Name = $Project.name $project_number = $project.unique_id $OutputPathBase_Project = $OutputPathBase + '\' + $project_number + '-' + $project_Name - Write-Host "Processing:" $project_Name -foregroundcolor Green + Write-Debug -Message ("Processing: $project_Name") -Debug # $project.visits | foreach -Parallel { @@ -44,10 +44,11 @@ do { New-Item -Path $OutputPathBase_Project -ItemType Directory } if ($visit) { + Write-Debug -Message ("Checking " + $visit.unique_id) -Debug $testURI = $visit.pdf_link + '&auth_token=' + $APIToken $Outfile = $OutputPathBase_Project + '\' + $visit.unique_id + ".pdf" if (!(Test-Path $Outfile)) { - Write-Host "Saving file: " $Outfile + Write-Debug ("Saving file: "+ $Outfile) -Debug Invoke-WebRequest -Uri $testURI -OutFile $Outfile }