@echo off : Author: Gerard O'Rourke : Date: 19/06/2018 SET FOLDER=C:\X-Support\Scripts\ SET LOGFILE=%FOLDER%\curl.log SET CUCMPUB=10.123.123.123 SET CUCMUSER=myAppAdminUser SET CUCMPW=myAppAdminpassword SET SOAPACTION="SOAPAction: \"soapDoControlServices\"" SET SOAPXMLFILE=%FOLDER%\soapRestartTVS.xml SET SOAP-ENDPOINT=https://%CUCMPUB%:8443/controlcenterservice2/services/ControlCenterServices FOR /f "tokens=1-4 delims=/ " %%A IN ('date /t') DO ( set nday=%%A set nmonth=%%B set nyear=%%C ) set SORTDATE=%nyear%%nmonth%%nday% FOR /f "tokens=1-2 delims=: " %%A IN ('time /t') DO ( set hour=%%A set min=%%B ) set SORTTIME=%hour%%min% set TIMESTAMP=%sortdate%-%sorttime% echo. >> %LOGFILE% echo ************************************ >> %LOGFILE% REM echo Timestamp: %TIMESTAMP% >> %LOGFILE% curl -k -u %CUCMUSER%:%CUCMPW% --header "Content-Type: text/xml;charset=UTF-8" --header %SOAPACTION% --data @%SOAPXMLFILE% %SOAP-ENDPOINT% >> %LOGFILE% ping 127.0.0.1 -n 10 >NUL