View Single Post
  #5  
Old 10-06-2015, 10:39 AM
Bob Bob is offline
Registered User
 
Join Date: Oct 2015
Posts: 5
Ok.

I've made a little try. I've copy the line in the DOS command prompt and it work well. Then I must deduct it's the way I call it in powershell.

I build each argument in variable and call it. Like this :

[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

# The call
& $CMD $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7

How can I call it to work ?
Reply With Quote