zulooideas.blogg.se

Stunnel windows command line
Stunnel windows command line











stunnel windows command line
  1. STUNNEL WINDOWS COMMAND LINE INSTALL
  2. STUNNEL WINDOWS COMMAND LINE PASSWORD
  3. STUNNEL WINDOWS COMMAND LINE DOWNLOAD
stunnel windows command line

" \\%USERDOMAIN%\NETLOGON\Blat\blat.exe" -f printserverreports local -to destinationaddress local -server 127.0.0.1:1099 -subject "ERROR: Print server usage report" -body "The print server usage report could not be generated due to an error. Please contact IT support for assistance." -log %BLATERRORLOGFILENAME % REM check if the e -mail was sent successfully (error level 0 returned) if it was, delete the Blat log file to clean up if it was not, display an error message to the console and leave the full error log file in place REM delete the generated reports to clean upĭel "D:\Scripts\Print job accounting report*.csv" 2> nul goto END :REPORT_ERROR REM the print job report generation process had an error, so mail an error reportĮcho ERROR : The print job report generation process had an error, so mailing an error report. If %ERRORLEVEL %= 0 ( del %BLATERRORLOGFILENAME %) else ( echo ERROR : %date % %time % An error occurred when Blat tried to send e -mail. The e -mail was not sent. Please check the log file %BLATERRORLOGFILENAME % for more information. & echo %date % %time % An error occurred when Blat tried to send e -mail. The e -mail was not sent. Error details are above. > %BLATERRORLOGFILENAME %) " \\%USERDOMAIN%\NETLOGON\Blat\blat.exe" -f printserverreports -to destinationaddress -server 127.0.0.1:1099 -subject "Print server usage report" -body "The print server usage report is attached." -attach "D:\Scripts\Print job accounting report*.csv" -log %BLATERRORLOGFILENAME % REM check if the e -mail was sent successfully (error level 0 returned) if it was, delete the Blat log file to clean up if it was not, display an error message to the console and leave the full error log file in place REM the print job report succeeded, so mail the generated reports to the desired recipient

stunnel windows command line

Powershell.exe -command "D:\Scripts\GeneratePrintJobAccountingReports.ps1 localhost PreviousMonth" if not %ERRORLEVEL %= 0 goto REPORT_ERROR Set BLATERRORLOGFILENAME= "%~f0-%date:~-4%%date:~4,2%%date:~7,2%-%time:~0,2%%time:~3,2%-ERROR.log" REM generate print job reports for specified print server for the specified time period REM %~f0 is the fully -qualified path name of this script. Note the Windows "Region and Language" format needs to be "English (United States)" (so the date environment variable is of the format "Sun ") Save script in D:\Scripts off REM Run this script on the first day of each month to generate and e -mail detail and summary reports of printer usage by username

stunnel windows command line

STUNNEL WINDOWS COMMAND LINE DOWNLOAD

To send e-mail report as attachment download below link from > Then Make below script in notepad and save as cmd.

STUNNEL WINDOWS COMMAND LINE INSTALL

Save settings and Install Stunnel as service.Īll Programs >Windows search search for stunnel Service Install and install Go to ProgramFile > stunnel >conf> nf and edit below lines If you didn't install and configure Stunnel you will stuck at this error " SMTP ERROR: ERROR-NOT A SOCKET"

STUNNEL WINDOWS COMMAND LINE PASSWORD

> Blat -install -Server -Port 465 -f printserverreports -u printserverreports Password And open cmd and type below command for setup your email settings in Blat. I am running this script in same printer server 2012.Īfter you complete generate report (to generate Print report userĭownload Blat and copy blat.exe and other files in system32 folder. įor sending e-mail using Gmail SMTP you may need 2 Utilities, If you are generating Print report using "GeneratePrintJobAccountingReports.ps1" and if you want send monthly report as e-mail you can use below script. Sending Email from the Command Line using Blat and Stunnel













Stunnel windows command line