ProxyInspector/MailDetective console

ProxyInspector/MailDetective console

ProxyInspector & MailDetective offers a variety of automation features: you can automate the import of logs, creation of reports and some other tasks.

Attention!
Please note, that all information below is valid for both ProxyInspector and MailDetective with one exception: In ProxyInspector console executable file is called PIConsole.exe and in MailDetective console executable is called MDConsole.exe.


Automating the Log Files Import

Use the -atgen, -import commands to automate the import of logs. The -import command imports the log files. The -atgen command may be used to create a batch file that will create the import tasks for the Windows NT/2000/XP built-in scheduler (it can work with any other scheduling software, including the WinGate scheduler). Enter the following command:
PIConsole.exe -atgen

to create a schedule.bat file. Below is a sample of such file:

at 08:00 /every:M,T,W,Th,F,S,Su "C:\PROGRAM FILES\PROXYINSPECTOR FOR WINGATE\piconsole.exe" -import
at 10:00 /every:M,T,W,Th,F,S,Su "C:\PROGRAM FILES\PROXYINSPECTOR FOR WINGATE\piconsole.exe" -import
at 12:00 /every:M,T,W,Th,F,S,Su "C:\PROGRAM FILES\PROXYINSPECTOR FOR WINGATE\piconsole.exe" -import
at 14:00 /every:M,T,W,Th,F,S,Su "C:\PROGRAM FILES\PROXYINSPECTOR FOR WINGATE\piconsole.exe" -import
at 16:00 /every:M,T,W,Th,F,S,Su "C:\PROGRAM FILES\PROXYINSPECTOR FOR WINGATE\piconsole.exe" -import
at 18:00 /every:M,T,W,Th,F,S,Su "C:\PROGRAM FILES\PROXYINSPECTOR FOR WINGATE\piconsole.exe" -import
at 20:00 /every:M,T,W,Th,F,S,Su "C:\PROGRAM FILES\PROXYINSPECTOR FOR WINGATE\piconsole.exe" -import
at 22:00 /every:M,T,W,Th,F,S,Su "C:\PROGRAM FILES\PROXYINSPECTOR FOR WINGATE\piconsole.exe" -import
at 00:00 /every:M,T,W,Th,F,S,Su "C:\PROGRAM FILES\PROXYINSPECTOR FOR WINGATE\piconsole.exe" -import

You can edit this file using any text editor (e.g. Notepad) and run it to create the import task in the Windows NT/2000/XP built-in scheduler.
By default the schedule.bat file is created in the process of ProxyInspector installation (using the PIConsole.exe -atgen command). This file will be stored in All Users\Application Data\ADVSoft\{pi_version} folder.

Use the PIConsole.exe -import command to import log files.

Report Creation

You can use the ProxyInspector console to automate creation and delivery of reports (this feature is available to registered ProxyInspector users only). A created report can be saved to disk or sent to a specified e-mail address. Reports created in the console mode must be based on templates, so you first need to create a template with specific settings (using the Report wizard) and save it. Use the following command to create a report and save it to a file:

PIConsole.exe -report "template_name" /saveto="file_name" [/no_rewrite] [/group="group_name"]

Note: If the file already exists, it will be overwritten, use /no_rewrite option to avoid this.

The following command will create a report and send it to the specified e-mail address (you can specify several e-mail addresses separating them with semicolons (";")):

PIConsole.exe -report "template_name" /mailto="recipient" [/subject="message_subject"] [/group="group_name"]

Additional keys:
/excel - report will be created as MS Excel workbook, Excel should be installed
/mht - report will be created in MHT format
/nocss - forces do not use CSS in HTML reports
/group="group_name" - create report for each member of the specified group, report template should be a report for a one user(any). This is options is not supported in ProxyInspector for WinProxy and MailDetective.

Database Management

When you delete database entries using the Database | Delete records command, it does not physically removes the entries from your hard drive, but only marks them as deleted. This feature can cause the excessive disk space consumption. Use the PIConsole.exe -packdb command to permanently remove the entries. You can use this command only if you work with the local database. If your data is stored on SQL Server, you will have to use the built-in server tools.

To repair local database use:

PIConsole.exe -repair_pdx

Symptoms are errors like "Blob has been modified" or "Key violation" during database operations.

ProxyInspector for ISA Server Enterprise edition

It is possible to perform Active Directory synchronization using PIConsole. In order to do this you should run the following command:

PIConsole.exe -adsync parameters

where parameters is:
/users - synchronize user properties
/groups - synchronize workgroups
/groups /repl - synchronize workgroups in replacement mode

you may use both /users & /groups parameters in one command. Default settings entered on Active Directory page in Program settings will be used. Connection will be made under currently used account.

Console Logs

Each time you start the ProxyInspector console, a log file (with the name like consoleddmmyyhhmmss.log) is created in the <Documents and Settings>\All Users\Application Data\ADVSoft\Program name\logs directory. The program writes to this file all system and error messages. If you want to disable the display of messages, run ProxyInspector console with the -silent key. The program will not show any messages or warnings, but the log file will still be created. The log files are stored for 7 days. ProxyInspector automatically deletes all logs that are more than 7 days old.