Contents
Recommendations
Before running the Import Wizard in a production environment, we recommend that you perform the following steps:
- Define the script input files.
- Stop the NightWatchman central service.
- Create a backup of the Agility Framework Reporting database.
- Start the NightWatchman central service.
Running the Wizard
You can run the Import Wizard interactively from the Start Menu\NightWatchman Management Center\ImportWizard.exe menu item or from a command prompt.
- Backup your NightWatchman database before you continue.
- The Welcome screen, click Next.
- On the Data Import Script screen, provide the following:
- Location of the import script to be used to populate the temporary staging table
- Location of the NightWatchman Management Center database
- The destination group, location or organisation
- On the Confirmation screen, click Next.
- On the Import Progress screen, you can see the progress of the import.
You may also be prompted for input in the conflict resolution stage.
- On the Completion screen, you can see the results of the import.
Import scripts and input files
The import Wizard comes with a number of sample scripts that use information from a number of sources to modify NightWatchman Management Center data to associate computers with their respective departments and buildings. These scripts are found in <installdir>\ConsoleService\ImportScripts
.
- The scripts are all named
<scriptname>.vbs.template
. Copy and rename them to<scriptname>.vbs
before you use them with the import Wizard. - The input files are all named
<inputfilename>.csv.template
. Copy and rename to<inputfilename>.csv
before you used them with the import Wizard.
For example, copy NWM_StagingTable_With_StoredProcedure.vbs
.template
and rename it to NWM_StagingTable_With_StoredProcedure.vbs
.
The sample scripts do the following:
- Imports Active Directory Organizational Units
- Imports Active Directory sites
- Maps computers to groups
- Maps Subnets to groups
- Resolves import conflicts
Purpose | Script |
---|---|
Import OUs |
Dependency: Level1,Level2,Level3,Level4,Level5,OU=OUName,DC=D1,DC=D2... DC=Dn,DCFQDN
|
Import AD sites | Map_AD_Sites_To_NWM_StagingTable.vbs.template Retrieves computer details from AD sites and writes them to a staging table ready for conversion into NightWatchman group hierarchies. This script returns computer details from all subnets in the site. Dependency: Map_AD_OUs_To_NWM_StagingTable_Input.csv Each line in the input file tells the Import Wizard what it should do with the computers in each Site. It is a comma-separated file and the format of each line is: Level1,Level2,Level3,Level4,Level5,Site
|
Map computers to groups | Map_Machines_To_NWM_StagingTable.vbs.template Retrieves a list of computer details from the Map_Machines_To_NWM_StagingTable_Input.csv input file and associates them with the specified groups.Dependency: Map_Machines_To_NWM_StagingTable_Input.csv Each line in the input file tells the Import Wizard what it should do with the computers in each Site. It is a comma-separated file and the format of each line is: Level1,Level2,Level3,Level4,Level5,NetBIOSName,ComputerDomain
|
Map subnets to groups |
Dependency: Level1, Level2, Level3, Level4, Level5, SubnetIP
|
Resolve import conflicts | Load_NWM_StagingTable_With_StoredProcedure.vbs.template The Import Wizard comes with a sample script that resolves to groups items that are in the conflicted table. This sample script shows how to use a stored procedure to load the staging table. It does not require an input file as it works on the conflicted imports table in the NightWatchman Management Console database. |
Importing data
Once the import script, target database and target hierarchy have been selected in the Import Wizard,the import process performs the following steps to import the information from Active Directory.
- Import data into the staging table – the
tbNWM_Dimension_Group_Staging
table is used to hold the information gathered from the source prior to converting it to the NightWatchman Console format. - Resolve computers by name – the script selected in the Import Wizard Data Import Script page is run and populates the
NetBiosName, DomainName, GroupPath
andSourceDataPath
columns in the staging table. - Look for computers in more than one group – this step identifies any conflicts in the information being imported where a computer is being allocated to more than one group in either the Organization or Location group hierarchies. When running the wizard interactively, the administrator is prompted to resolve conflicts as they arise.
- Add new groups – creates new groups necessary, arising from processing the import data.
- Move computers to groups – the identified computers are moved to their allocated groups.
- Queue computers for policy refresh – an existing group may have its own power policy assigned, any computer moved into a group is prompted to refresh its policy.
- Clear staging table – once the import is completed, the staging table is purged of content.
Command-line parameters
By default the Import Wizard is located in the following directory:
32Bit Machines:C:\Program Files\1E\NightWatchman Management Center\ConsoleService 64Bit Machines:C:\Program Files(x86)\1E\NightWatchman Management Center\ConsoleService
It can be run from a command-line with:
ImportWizard.exe <command-line parameters>
For example, to run the Import wizard in unattended mode on a particular SQL Server instance and using the built-in machine mapping script to assign machines to organization groups:
ImportWizard.exe -IsSilent -AfrServer SQLSERVER\INSTANCE,14333 -Provider_VBScriptFile="ImportScripts\Map_Machines_To_NWM_StagingTable.vbs" -TierLevelType="organization"
The command-line parameters for the Import Wizard are:
Parameters | Default value | Notes |
---|---|---|
AfrServer | The SQL details provided when the Import Wizard component was installed | Location for the NightWatchman Management Center Web Service. |
iSilent
| Not silent | Controls whether dialogs are displayed during the import process. When isSilent is not used, the Import Wizard is displayed to perform the steps interactively, pre-populated with other settings from the command-line. When isSilent is used, the process is invisible. |
Provider_VBScriptFile | Sets the name of the VBScript file used to import data into the staging table. | |
RemoveStagingTableOnExit | True | Clears the data from the staging table after the import process is completed. |
TierLevelType | Location | Group structure for the imported machines. This may be set to either of the following values:
|
The default values for these parameters are stored in the ImportWizard.exe.config file which also contains the name of the database, however the isSilent value is ignored, which means isSilent parameter must be used to run the process silently.