update to use Debug Flag.

This commit is contained in:
Erik Eckert 2023-08-10 11:54:59 -06:00
parent f779dc73e4
commit 561b44d4ee

View File

@ -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
}