View Single Post
  #8  
Old 10-06-2015, 12:46 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,019
Hi Bob,

I think you have forgotten leading (or trailing) spaces when assigning the info to variables.

In my tests, I did get errors if the assigned variable started with '/Option', because when you run the PowerShell statement:

Code:
# The call
& $CMD $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7
The spaces between the args are not literal.

So each variable assignment will likely need a leading or trailing space to separate the SFXCL options:

Code:
[string]$CMD = 'SFXCL'
[string]$arg1 = ' /Q'
[string]$arg2 = ' /Log ' + $CheminLog + '\Log' + $(get-date -f yyyyMMddHHmmss) + '.log'
[string]$arg3 = ' /I ' + $CheminClePrive
[string]$arg4 = ' /P ''' + $Passphrase + ''''
[string]$arg5 = ' /F ' + $CheminConfigSecureFX
[string]$arg6 = ' \\' + $Serveur + $CheminFichier + $fichier
[string]$arg7 = ' SFTP://' + $UserCCD + '@' + $HostaddressCCD + ':/' + $RepertoireCCD
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote