From 46ed82e775c361e45b709dc9d4a5c8e3716be88f Mon Sep 17 00:00:00 2001 From: AlbertoInf Date: Thu, 17 Mar 2022 07:41:48 +0100 Subject: [PATCH 1/2] vrftr-4297: PR creation From d458e4e8e432ca5445c5ef5db279d855120d59f4 Mon Sep 17 00:00:00 2001 From: AlbertoInf Date: Thu, 17 Mar 2022 08:19:33 +0100 Subject: [PATCH 2/2] vrftr-4297 vrftr-4308: [PowerShell] Fix $_configPath not filled correctly on PowerShell ISE --- powershell/download/DownloadFiles.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/powershell/download/DownloadFiles.ps1 b/powershell/download/DownloadFiles.ps1 index c7a17a2..599cc67 100644 --- a/powershell/download/DownloadFiles.ps1 +++ b/powershell/download/DownloadFiles.ps1 @@ -8,7 +8,7 @@ Param( Mandatory = $false, HelpMessage = 'Full path of the configuration (e.g. C:\Visma\File API\Ftaas.Examples\powershell\download\config.xml). Default value: set in the code.' )] - [string] $_configPath = "$($PSScriptRoot)\config.xml", + [string] $_configPath, [Alias("RenewCredentials")] [Parameter( @@ -20,6 +20,11 @@ Param( $ErrorActionPreference = "Stop" +# The default value of this parameter is set here because $PSScriptRoot is empty if used directly in Param() through PowerShell ISE. +if (-not $_configPath) { + $_configPath = "$($PSScriptRoot)\config.xml" +} + Write-Host "=========================================================" Write-Host "File API example: Download files specified in a filter." Write-Host "========================================================="