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 }