From c2b7a3e27fcdda9fe5915576e7156d6e27764f46 Mon Sep 17 00:00:00 2001 From: Rajat Agrawal Date: Wed, 16 May 2018 20:18:53 +0530 Subject: [PATCH 1/5] fixed single file blob upload --- Tasks/AzureFileCopyV2/Utility.ps1 | 24 +++++++++++++++++++++--- Tasks/AzureFileCopyV2/task.json | 3 ++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Tasks/AzureFileCopyV2/Utility.ps1 b/Tasks/AzureFileCopyV2/Utility.ps1 index 729f231de608..a187b0e99757 100644 --- a/Tasks/AzureFileCopyV2/Utility.ps1 +++ b/Tasks/AzureFileCopyV2/Utility.ps1 @@ -247,16 +247,34 @@ function Upload-FilesToAzureContainer { Write-Output (Get-VstsLocString -Key "AFC_UploadFilesStorageAccount" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) + $resolvedSourcePath = $sourcePath + + # Check if source path is a file. If yes, then add /Pattern additional argument. + if(Test-Path -Path $sourcePath -PathType Leaf) + { + $fileInfo = Get-Item $sourcePath + $resolvedSourcePath = $fileInfo.Directory.FullName + $additionalArguments += " /Pattern:$($fileInfo.Name)" + } + $blobPrefix = $blobPrefix.Trim() $containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix).Trim("/") $azCopyExeLocation = Join-Path -Path $azCopyLocation -ChildPath "AzCopy.exe" - Write-Verbose "Executing command: & `"$azCopyExeLocation`" /Source:$sourcePath /Dest:$containerURL /DestKey:`"*****`" $additionalArguments" + Write-Verbose "Executing command: & `"$azCopyExeLocation`" /Source:$resolvedSourcePath /Dest:$containerURL /DestKey:`"*****`" $additionalArguments" - $uploadToBlobCommand = "& `"$azCopyExeLocation`" /Source:$sourcePath /Dest:$containerURL /DestKey:`"$storageKey`" $additionalArguments" + $uploadToBlobCommand = "& `"$azCopyExeLocation`" /Source:$resolvedSourcePath /Dest:$containerURL /DestKey:`"$storageKey`" $additionalArguments" Invoke-Expression $uploadToBlobCommand - Write-Output (Get-VstsLocString -Key "AFC_UploadFileSuccessful" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) + + if($LASTEXITCODE -eq 0) + { + Write-Output (Get-VstsLocString -Key "AFC_UploadFileSuccessful" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) + } + else + { + throw (Get-VstsLocString -Key "AFC_AzCopyBlobUploadNonZeroExitCode") + } } catch { diff --git a/Tasks/AzureFileCopyV2/task.json b/Tasks/AzureFileCopyV2/task.json index 7a7f8b21d7bc..58e7f40814f0 100644 --- a/Tasks/AzureFileCopyV2/task.json +++ b/Tasks/AzureFileCopyV2/task.json @@ -344,6 +344,7 @@ "AFC_BlobStorageNotFound": "Storage account: {0} not found. Please specify existing storage account", "AFC_RootContainerAndDirectory": "'/S' option is not valid for $root containers.", "AFC_RedirectResponseInvalidStatusCode": "The HTTP response code: '{0}' is not a valid redirect status code", - "AFC_RedirectResponseLocationHeaderIsNull": "Redirect response location header is null." + "AFC_RedirectResponseLocationHeaderIsNull": "Redirect response location header is null.", + "AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe exited with non-zero exit code while uploading files to blob storage." } } \ No newline at end of file From 01245f16738e091d1adc4812c03d85635d46b67f Mon Sep 17 00:00:00 2001 From: Rajat Agrawal Date: Wed, 16 May 2018 20:18:53 +0530 Subject: [PATCH 2/5] fixed single file blob upload --- .../resources.resjson/en-US/resources.resjson | 5 ++-- Tasks/AzureFileCopyV2/Utility.ps1 | 24 ++++++++++++++++--- Tasks/AzureFileCopyV2/task.json | 5 ++-- Tasks/AzureFileCopyV2/task.loc.json | 3 ++- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/Tasks/AzureFileCopyV2/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureFileCopyV2/Strings/resources.resjson/en-US/resources.resjson index a47e2025c345..579db0ed5278 100644 --- a/Tasks/AzureFileCopyV2/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/AzureFileCopyV2/Strings/resources.resjson/en-US/resources.resjson @@ -37,7 +37,7 @@ "loc.input.label.TargetPath": "Destination Folder", "loc.input.help.TargetPath": "Local path on the target machines for copying the files from the source. Environment variable can be used like $env:windir\\BudgetIT\\Web.", "loc.input.label.AdditionalArgumentsForBlobCopy": "Optional Arguments (for uploading files to blob)", - "loc.input.help.AdditionalArgumentsForBlobCopy": "Optional AzCopy.exe arguments that will be applied when uploading to blob like, /NC:10. If no optional arguments are specified here, the following optional arguments will be added by default.
/Y, /SetContentType, /Z, /V,
/S (only if container name is not $root),
/BlobType:page (only if specified storage account is a premium account)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Optional AzCopy.exe arguments that will be applied when uploading to blob like, /NC:10. If no optional arguments are specified here, the following optional arguments will be added by default.
/Y, /SetContentType, /Z, /V,
/S (only if container name is not $root),
/BlobType:page (only if specified storage account is a premium account).
If source path is a file, /Pattern will always be added irrespective of whether or not you have added optional arguments.", "loc.input.label.AdditionalArgumentsForVMCopy": "Optional Arguments (for downloading files to VM)", "loc.input.help.AdditionalArgumentsForVMCopy": "Optional AzCopy.exe arguments that will be applied when downloading to VM like, /NC:10. If no optional arguments are specified here, the following optional arguments will be added by default.
/Y, /S, /Z, /V", "loc.input.label.enableCopyPrerequisites": "Enable Copy Prerequisites", @@ -93,5 +93,6 @@ "loc.messages.AFC_BlobStorageNotFound": "Storage account: {0} not found. Please specify existing storage account", "loc.messages.AFC_RootContainerAndDirectory": "'/S' option is not valid for $root containers.", "loc.messages.AFC_RedirectResponseInvalidStatusCode": "The HTTP response code: '{0}' is not a valid redirect status code", - "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "Redirect response location header is null." + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "Redirect response location header is null.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe exited with non-zero exit code while uploading files to blob storage." } \ No newline at end of file diff --git a/Tasks/AzureFileCopyV2/Utility.ps1 b/Tasks/AzureFileCopyV2/Utility.ps1 index 729f231de608..a187b0e99757 100644 --- a/Tasks/AzureFileCopyV2/Utility.ps1 +++ b/Tasks/AzureFileCopyV2/Utility.ps1 @@ -247,16 +247,34 @@ function Upload-FilesToAzureContainer { Write-Output (Get-VstsLocString -Key "AFC_UploadFilesStorageAccount" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) + $resolvedSourcePath = $sourcePath + + # Check if source path is a file. If yes, then add /Pattern additional argument. + if(Test-Path -Path $sourcePath -PathType Leaf) + { + $fileInfo = Get-Item $sourcePath + $resolvedSourcePath = $fileInfo.Directory.FullName + $additionalArguments += " /Pattern:$($fileInfo.Name)" + } + $blobPrefix = $blobPrefix.Trim() $containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix).Trim("/") $azCopyExeLocation = Join-Path -Path $azCopyLocation -ChildPath "AzCopy.exe" - Write-Verbose "Executing command: & `"$azCopyExeLocation`" /Source:$sourcePath /Dest:$containerURL /DestKey:`"*****`" $additionalArguments" + Write-Verbose "Executing command: & `"$azCopyExeLocation`" /Source:$resolvedSourcePath /Dest:$containerURL /DestKey:`"*****`" $additionalArguments" - $uploadToBlobCommand = "& `"$azCopyExeLocation`" /Source:$sourcePath /Dest:$containerURL /DestKey:`"$storageKey`" $additionalArguments" + $uploadToBlobCommand = "& `"$azCopyExeLocation`" /Source:$resolvedSourcePath /Dest:$containerURL /DestKey:`"$storageKey`" $additionalArguments" Invoke-Expression $uploadToBlobCommand - Write-Output (Get-VstsLocString -Key "AFC_UploadFileSuccessful" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) + + if($LASTEXITCODE -eq 0) + { + Write-Output (Get-VstsLocString -Key "AFC_UploadFileSuccessful" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) + } + else + { + throw (Get-VstsLocString -Key "AFC_AzCopyBlobUploadNonZeroExitCode") + } } catch { diff --git a/Tasks/AzureFileCopyV2/task.json b/Tasks/AzureFileCopyV2/task.json index 7a7f8b21d7bc..24807fad9618 100644 --- a/Tasks/AzureFileCopyV2/task.json +++ b/Tasks/AzureFileCopyV2/task.json @@ -207,7 +207,7 @@ "label": "Optional Arguments (for uploading files to blob)", "required": false, "defaultValue": "", - "helpMarkDown": "Optional AzCopy.exe arguments that will be applied when uploading to blob like, /NC:10. If no optional arguments are specified here, the following optional arguments will be added by default.
/Y, /SetContentType, /Z, /V,
/S (only if container name is not $root),
/BlobType:page (only if specified storage account is a premium account)" + "helpMarkDown": "Optional AzCopy.exe arguments that will be applied when uploading to blob like, /NC:10. If no optional arguments are specified here, the following optional arguments will be added by default.
/Y, /SetContentType, /Z, /V,
/S (only if container name is not $root),
/BlobType:page (only if specified storage account is a premium account).
If source path is a file, /Pattern will always be added irrespective of whether or not you have added optional arguments." }, { "name": "AdditionalArgumentsForVMCopy", @@ -344,6 +344,7 @@ "AFC_BlobStorageNotFound": "Storage account: {0} not found. Please specify existing storage account", "AFC_RootContainerAndDirectory": "'/S' option is not valid for $root containers.", "AFC_RedirectResponseInvalidStatusCode": "The HTTP response code: '{0}' is not a valid redirect status code", - "AFC_RedirectResponseLocationHeaderIsNull": "Redirect response location header is null." + "AFC_RedirectResponseLocationHeaderIsNull": "Redirect response location header is null.", + "AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe exited with non-zero exit code while uploading files to blob storage." } } \ No newline at end of file diff --git a/Tasks/AzureFileCopyV2/task.loc.json b/Tasks/AzureFileCopyV2/task.loc.json index 1001f5af0dc8..9ae8510c7963 100644 --- a/Tasks/AzureFileCopyV2/task.loc.json +++ b/Tasks/AzureFileCopyV2/task.loc.json @@ -358,6 +358,7 @@ "AFC_BlobStorageNotFound": "ms-resource:loc.messages.AFC_BlobStorageNotFound", "AFC_RootContainerAndDirectory": "ms-resource:loc.messages.AFC_RootContainerAndDirectory", "AFC_RedirectResponseInvalidStatusCode": "ms-resource:loc.messages.AFC_RedirectResponseInvalidStatusCode", - "AFC_RedirectResponseLocationHeaderIsNull": "ms-resource:loc.messages.AFC_RedirectResponseLocationHeaderIsNull" + "AFC_RedirectResponseLocationHeaderIsNull": "ms-resource:loc.messages.AFC_RedirectResponseLocationHeaderIsNull", + "AFC_AzCopyBlobUploadNonZeroExitCode": "ms-resource:loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode" } } \ No newline at end of file From b1c9adc1ba854f8fd6da79ba7ce8a4b55e7326af Mon Sep 17 00:00:00 2001 From: Rajat Agrawal Date: Wed, 16 May 2018 21:16:28 +0530 Subject: [PATCH 3/5] fixed L0 --- Tasks/AzureFileCopyV2/Tests/L0UploadFilesToAzureContainer.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tasks/AzureFileCopyV2/Tests/L0UploadFilesToAzureContainer.ps1 b/Tasks/AzureFileCopyV2/Tests/L0UploadFilesToAzureContainer.ps1 index eb569a126148..81b508faba23 100644 --- a/Tasks/AzureFileCopyV2/Tests/L0UploadFilesToAzureContainer.ps1 +++ b/Tasks/AzureFileCopyV2/Tests/L0UploadFilesToAzureContainer.ps1 @@ -9,6 +9,7 @@ $invalidInputStorageAccount = "invalidInputStorageAccount" $exceptionMessage = "Exception thrown" Register-Mock Write-Telemetry { } +Register-Mock Test-Path { return $false } # Test 1 "Should throw if Invoke-Expression fails" Register-Mock Invoke-Expression { throw $exceptionMessage } @@ -31,6 +32,7 @@ Assert-WasCalled Remove-AzureContainer -Times 1 # Test 3 "Success in Upload blob destination" Unregister-Mock Invoke-Expression Register-Mock Invoke-Expression { return $succeededCopyResponse } +$LASTEXITCODE = 0 Upload-FilesToAzureContainer -sourcePath $validInputSourcePath -storageAccountName $validInputStorageAccount -containerName $validInputContainerName ` -blobPrefix $validInputBlobPrefix -storageKey $validStorageKey -azCopyLocation $validAzCopyLocation -destinationType $validInputAzureBlobDestinationType From b14580455daf7d6da29765d05763b17554717768 Mon Sep 17 00:00:00 2001 From: Rajat Agrawal Date: Thu, 17 May 2018 16:20:22 +0530 Subject: [PATCH 4/5] clean target issue + pr comments --- .../AzureFileCopyRemoteJob.ps1 | 40 ++++++++++++++----- Tasks/AzureFileCopyV2/Utility.ps1 | 12 +++--- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/Tasks/AzureFileCopyV2/AzureFileCopyRemoteJob.ps1 b/Tasks/AzureFileCopyV2/AzureFileCopyRemoteJob.ps1 index e5e2a14ab74b..581ce8223463 100644 --- a/Tasks/AzureFileCopyV2/AzureFileCopyRemoteJob.ps1 +++ b/Tasks/AzureFileCopyV2/AzureFileCopyRemoteJob.ps1 @@ -23,6 +23,22 @@ $AzureFileCopyRemoteJob = { } } + function Write-LogsAndCleanup + { + [CmdletBinding()] + param( + [Nullable[bool]]$isLogsPresent, + [AllowEmptyString()][string]$logFilePath, + [AllowEmptyString()][string]$azCopyLocation + ) + + # Print AzCopy.exe verbose logs + Get-AzCopyVerboseLogs -isLogsPresent $isLogsPresent -logFilePath $logFilePath -ErrorAction SilentlyContinue + + # Delete AzCopy tool folder + Remove-AzCopyFolder -azCopyLocation $azCopyLocation -ErrorAction SilentlyContinue + } + function Get-AzCopyVerboseLogs { [CmdletBinding()] @@ -51,6 +67,8 @@ $AzureFileCopyRemoteJob = { try { + $useDefaultArguments = ($additionalArguments -eq "") + $azCopyToolFileNames = $azCopyToolFileNamesString.Split(";") $azCopyToolFileContents = $azCopyToolFileContentsString.Split(";") @@ -72,15 +90,21 @@ $AzureFileCopyRemoteJob = { if($CleanTargetBeforeCopy) { - Get-ChildItem -Path $targetPath -Recurse -Force | Remove-Item -Force -Recurse - Write-DetailLogs "Destination location cleaned" + if (Test-Path $targetPath -PathType Container) + { + Get-ChildItem -Path $targetPath -Recurse -Force | Remove-Item -Force -Recurse + Write-DetailLogs "Destination location cleaned" + } + else + { + Write-DetailLogs "Folder at path $targtPath not found for cleanup." + } } $azCopyExeLocation = Join-Path -Path $azCopyDestinationPath -ChildPath "AzCopy.exe" $logFileName = "AzCopyVerbose_" + [guid]::NewGuid() + ".log" $logFilePath = Join-Path -Path $azCopyDestinationPath -ChildPath $logFileName - $useDefaultArguments = ($additionalArguments -eq "") if($useDefaultArguments) { @@ -94,9 +118,9 @@ $AzureFileCopyRemoteJob = { $additionalArguments = "/Z:`"$azCopyDestinationPath`" /V:`"$logFilePath`" /S /Y" } - Write-DetailLogs "Executing command: & `"$azCopyExeLocation`" /Source:$containerURL /Dest:`"$targetPath`" /SourceSAS:`"*****`" $additionalArguments" + Write-DetailLogs "Executing command: & `"$azCopyExeLocation`" /Source:`"$containerURL`" /Dest:`"$targetPath`" /SourceSAS:`"*****`" $additionalArguments" - $azCopyCommand = "& `"$azCopyExeLocation`" /Source:$containerURL /Dest:`"$targetPath`" /SourceSAS:`"$containerSasToken`" $additionalArguments" + $azCopyCommand = "& `"$azCopyExeLocation`" /Source:`"$containerURL`" /Dest:`"$targetPath`" /SourceSAS:`"$containerSasToken`" $additionalArguments" Invoke-Expression $azCopyCommand } catch @@ -106,10 +130,6 @@ $AzureFileCopyRemoteJob = { } finally { - # Print AzCopy.exe verbose logs - Get-AzCopyVerboseLogs -isLogsPresent $useDefaultArguments -logFilePath $logFilePath -ErrorAction SilentlyContinue - - # Delete AzCopy tool folder - Remove-AzCopyFolder -azCopyLocation $azCopyDestinationPath -ErrorAction SilentlyContinue + Write-LogsAndCleanup -isLogsPresent $useDefaultArguments -logFilePath "$logFilePath" -azCopyLocation "$azCopyDestinationPath" -ErrorAction SilentlyContinue } } \ No newline at end of file diff --git a/Tasks/AzureFileCopyV2/Utility.ps1 b/Tasks/AzureFileCopyV2/Utility.ps1 index a187b0e99757..c3af21d6230e 100644 --- a/Tasks/AzureFileCopyV2/Utility.ps1 +++ b/Tasks/AzureFileCopyV2/Utility.ps1 @@ -254,16 +254,16 @@ function Upload-FilesToAzureContainer { $fileInfo = Get-Item $sourcePath $resolvedSourcePath = $fileInfo.Directory.FullName - $additionalArguments += " /Pattern:$($fileInfo.Name)" + $additionalArguments += " /Pattern:`"$($fileInfo.Name)`"" } $blobPrefix = $blobPrefix.Trim() $containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix).Trim("/") $azCopyExeLocation = Join-Path -Path $azCopyLocation -ChildPath "AzCopy.exe" - Write-Verbose "Executing command: & `"$azCopyExeLocation`" /Source:$resolvedSourcePath /Dest:$containerURL /DestKey:`"*****`" $additionalArguments" + Write-Verbose "Executing command: & `"$azCopyExeLocation`" /Source:`"$resolvedSourcePath`" /Dest:`"$containerURL`" /DestKey:`"*****`" $additionalArguments" - $uploadToBlobCommand = "& `"$azCopyExeLocation`" /Source:$resolvedSourcePath /Dest:$containerURL /DestKey:`"$storageKey`" $additionalArguments" + $uploadToBlobCommand = "& `"$azCopyExeLocation`" /Source:`"$resolvedSourcePath`" /Dest:`"$containerURL`" /DestKey:`"$storageKey`" $additionalArguments" Invoke-Expression $uploadToBlobCommand @@ -293,7 +293,7 @@ function Upload-FilesToAzureContainer } finally { - Handle-AzCopyLogs -isLogsPresent $useDefaultArguments -logsFilePath $azCopyLogFilePath -ErrorAction SilentlyContinue + Handle-AzCopyLogs -isLogsPresent $useDefaultArguments -logsFilePath "$azCopyLogFilePath" -ErrorAction SilentlyContinue } } @@ -301,8 +301,8 @@ function Handle-AzCopyLogs { [CmdletBinding()] param( - [bool]$isLogsPresent, - [string]$logsFilePath + [Nullable[bool]]$isLogsPresent, + [AllowEmptyString()][string]$logsFilePath ) if($isLogsPresent) From 1e0b753e34c07a7c8b8920e5d4047451e09bf748 Mon Sep 17 00:00:00 2001 From: Rajat Agrawal Date: Thu, 17 May 2018 22:00:19 +0530 Subject: [PATCH 5/5] pr feedback --- Tasks/AzureFileCopyV2/AzureFileCopyRemoteJob.ps1 | 2 +- Tasks/AzureFileCopyV2/Utility.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Tasks/AzureFileCopyV2/AzureFileCopyRemoteJob.ps1 b/Tasks/AzureFileCopyV2/AzureFileCopyRemoteJob.ps1 index 581ce8223463..ddd113520fcd 100644 --- a/Tasks/AzureFileCopyV2/AzureFileCopyRemoteJob.ps1 +++ b/Tasks/AzureFileCopyV2/AzureFileCopyRemoteJob.ps1 @@ -118,7 +118,7 @@ $AzureFileCopyRemoteJob = { $additionalArguments = "/Z:`"$azCopyDestinationPath`" /V:`"$logFilePath`" /S /Y" } - Write-DetailLogs "Executing command: & `"$azCopyExeLocation`" /Source:`"$containerURL`" /Dest:`"$targetPath`" /SourceSAS:`"*****`" $additionalArguments" + Write-DetailLogs "##[command] & `"$azCopyExeLocation`" /Source:`"$containerURL`" /Dest:`"$targetPath`" /SourceSAS:`"*****`" $additionalArguments" $azCopyCommand = "& `"$azCopyExeLocation`" /Source:`"$containerURL`" /Dest:`"$targetPath`" /SourceSAS:`"$containerSasToken`" $additionalArguments" Invoke-Expression $azCopyCommand diff --git a/Tasks/AzureFileCopyV2/Utility.ps1 b/Tasks/AzureFileCopyV2/Utility.ps1 index c3af21d6230e..714a2f4f9c18 100644 --- a/Tasks/AzureFileCopyV2/Utility.ps1 +++ b/Tasks/AzureFileCopyV2/Utility.ps1 @@ -261,7 +261,7 @@ function Upload-FilesToAzureContainer $containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix).Trim("/") $azCopyExeLocation = Join-Path -Path $azCopyLocation -ChildPath "AzCopy.exe" - Write-Verbose "Executing command: & `"$azCopyExeLocation`" /Source:`"$resolvedSourcePath`" /Dest:`"$containerURL`" /DestKey:`"*****`" $additionalArguments" + Write-Output "##[command] & `"$azCopyExeLocation`" /Source:`"$resolvedSourcePath`" /Dest:`"$containerURL`" /DestKey:`"*****`" $additionalArguments" $uploadToBlobCommand = "& `"$azCopyExeLocation`" /Source:`"$resolvedSourcePath`" /Dest:`"$containerURL`" /DestKey:`"$storageKey`" $additionalArguments" @@ -293,7 +293,7 @@ function Upload-FilesToAzureContainer } finally { - Handle-AzCopyLogs -isLogsPresent $useDefaultArguments -logsFilePath "$azCopyLogFilePath" -ErrorAction SilentlyContinue + Handle-AzCopyLogs -isLogsPresent $useDefaultArguments -logsFilePath $azCopyLogFilePath -ErrorAction SilentlyContinue } }