Anaplan Connect - Use of Certificate in script does not work
I have the following script written up to update a module to hold Today's date and time.
The script worked fine when I was using my username and was prompted for the password.
As I am looking to schedule this script everyday, I want ahead and downloaded the certificate linked to my user and changed the script as seen on user guides.
However I still get prompted for a password.
Can someone please help me?
This is the script:
set AnaplanUser="[email protected]"
set Operation -certificate "C:\Users\Elisa\Documents\certificate-222628677637089600518301929753078471363.cer" -export
:: This script looks up the current date, writes it to a csv file, and sends it to Anaplan
:: Here we set the file path of the csv file we will be writing the current date too
:: rem This is a simple for loop that parses the date /t function
FOR /f "tokens=1,2,3 delims=-" %%a in ('date /t') do (set mm=%%b& set dd=%%c& set yyyy=%%a)
@echo "Current Date","Heure"> %FileName%
@echo "%mydate%","%TIME%">> %FileName%
set Operation=-file "CurrentDate.csv" -put %FileName% -import "Today from CurrentDate.csv" -execute -output "C:\Users\Elisa\Downloads\anaplan-connect-1-3-3-5\anaplan-connect-1-3-3-5\Errors"
rem *** End of settings - Do not edit below this line ***
setlocal enableextensions enabledelayedexpansion || exit /b 1
if not %AnaplanUser% == "" set Credentials=-user %AnaplanUser%
set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model %ModelId% %Operation%
cmd /c %Command%