Script file format
Top  Previous  Next


A typical NTreport script file consists of three sections. Each section begins with a begin label and ends with an end label. The begin and end labels are surrounded by brackets.

1) Settings - [Settings_Begin] ... [Settings_end]

·Specifies which properties to read - which NTinfo boxes to check, one setting per row.  
·Also contains some general NTreport settings.  

2) Machines - [Machines_Begin] ... [Machines_End]

·FlowMode=1:  
·List of machines to get data from, one machine per row.  
·In this mode the [Machines] section is only used when the list "*LIST*" option is specified in the Get.Data command.  
·FlowMode=2:  
·List of machines to run commands for, one machine per row.  
·In this mode the [Machines] section is used for commands inside a Machines.Loop..Machines.EndLoop structure; for each machine in the [Machines] section - run all commands inside the Machines.Loop..Machines.EndLoop structure.  

There are many ways to create a list of machines

·Type in the machine names manually in the [Machines] section.  
·Click Action > "Create list of machines" to generate a list of available servers or workstations in one domain.  
·Click File > Open section > Machines to fill the [Machines] section with names from a clear text file.  
·Click Edit > Paste section > Machines to paste machine names from the clipboard.  

3) Commands - [Batch_Begin] ... [Batch_End]

·Contains script commands - instructions of what to do, one command per row.  

How the sections are used in a script

The NTreport.FlowMode setting selects command flow mode.

FlowMode=1 (default, original NTreport mode):
 
Use FlowMode 1 when data from all machines should be treated as one big chunk of data.  
 
Flow:  
Run commands in [Batch] section, one time only even if there are many machines  
If Get.Data *LIST* command exists - get data for all machines in [Machines] section  
 
FlowMode=2:

Use FlowMode 2 when data from each machine should be treated as a separate chunk of data.  
 
Flow:  
Run [Batch] section  
If Machines.Loop..Machines.EndLoop statement exists, then for each row in [Machines] section, loop commands between Machines.Loop and Machines.EndLoop  

Limitations in FlowMode 2: The Get.Data command must be put inside a Machines.Loop..Machines.EndLoop statement. Get.Data gets data from the current machine in the Machines.Loop..Machines.EndLoop statement, not possible to specify a domain. The "NTinfo.Event.Log.Date=*NEW*" setting can not be used.  
 
Both FlowModes reads data from [Settings] the same way.