WMIUpdater - Updating the computer configuration

SHOW ALL CONTENT

Table of contents

Overview

WMIUpdater (ESI.Octopus.WMIUpdaterApp.exe) allows the update of the configuration in Octopus (hardware and software) of computers in your network. You can synchronize on a particular CI or you can run the update from an automated Windows task. 

Prerequisites

  • The creation of an Octopus System account to run the task with it. See the Octopus System Account article. 
  • Allow network connections to machines that need to be inventoried to allow access to the remote RPC server:
    • TCP 135,445
    • UDP 137
  • You also need to import the CIs, either with Active Directory or from another source using DataImporter, before you can run WMIUpdater. However you can import the CI at the same time as you run the synchronization if you do it from a range of IP addresses.

Description of the fonctionnality

When WMIUpdater is executed, it reads all CI types that have been checked with "Is a computer" and that have "Activate configuration detect via WMI" checked in their file.

  • Tools > Reference Data Management > CI > Type

  • Configuration Module
  • Select a CI 
  • Configuration Tab

WMIUpdater Steps

What you need to know
  • The program is configured to read 16 workstations at a time.
  • WMI will never read a workstation that is Retired
  • By default, WMI will only read the workstations that are in service
    • If required, use the /HostsConfigFilePath parameter to read stations that are in a status other than. In service or Retired
  1. Attempts to connect to the workstation 
  2. Once connected, it retrieves the workstation configuration (hardware and software) 
  3. Writes the information to a file (WMIComputers.xml) 
  4. Once all the workstations have all been done, the information gets transferred to Octopus by the program. The data transfer to the server is done only once, at the end of the whole process.

If the program cannot retrieve the configuration information of a workstation, the workstation will end up in the WMI error report.

How to use WMIUpdater

WMIUpdater is a "command line" type of program (DOS). It is designed to be easily automated (the section for Updating the WMI configuration from a command line describes how to automate the WMIUpdater execution). 

  • The complete name of the WMIUpdater program is: ESI.Octopus.WMIUpdaterApp.exe
  • It is located in the local Octopus directory of your computer(C:\Program Files\Octopus) or in (\%homepath%\AppData\Local\Octopus)
  • Here are some example of where you can find the Octopus folder:
    • For Windows 7: C:\Users\slevesque\AppData\Local\Octopus
    • For Windows XP: C:\Documents and Settings\Slevesque\Local Settings\Application Data\Octopus

What you need to know:

Each time the program is run a .LOG file is created in this format; ToolName_YYYYMMDD_HHMMSS.log

  • For example WMIUpdater_20190618_105242.log.

Use this file to see the results of the command execution and errors if there are any.

Also see the Octopus Tools | Maintenance of log files article about the importance of the log file management. 

It is possible to generate an encrypted password and hide the password at runtime, see this article for details.

Parameters

There are 11 available parameters, 3 of which are mandatory to execute WMIUpdater:

Mandatory Parameters

  • /Login
    • Octopus username
  • /Password
    • Octopus password
  • /Team

    • The number of the team to be updated. By default, the IT team is 1

Optional Parameters

  • /NoUsersDetection
    • Add if you don't want to link the workstations to the users. Note that all profiles found on a station will be interpreted as users of the workstation and will be added in the list of users for this workstation, except for those who have a standard license/assignee role in Octopus.
  • /NoPrintersDetection
    • Add this parameters if you don't want to add the local printers
  • /Site
    • Add this parameter to synchronize only the workstations from a specific site or subsite
    • The name of the site/subsite used is unique
    • Ex.: /Site:Name of site or Ex.: /Site:Name of subsite
  • /LogFilePath
    • Enables you to replace the name and location of the log file. By default, the file is called WMIUpdater_AAAAMMJJ_HHMMSS.log and is located in the folder from where you run the WMIUpdater executable. If you move this file in a folder different of Octopus folder, make sure it exists (the system cannot create the folder)
    • Ex.:/LogFilePath:C:\LogFiles\WMIFile.log
  • /NoDbUpdate
    • The program will execute, but will not update the Octopus database. The information gathered will be recorded in the WMIComputers.xml file. You can import this file later by using the "NoExtraction" parameter
  • /NoExtraction
    • The data will not be updated from the network, but from the .xml file
    • Ex.:/NoExtraction:WMIComputers.xml or /NoExtraction:MyFile.xml
  • /OutputFileName
    • By default, the file for the udpated information (XML file) is called WMIComputers.xml, but it is possible to rename it. Note that the file must be located in the Octopus folder or in a folder under it, but the file must exist
    • Ex.: /OutputFileName:MyFile.xml or /OutputFileName:Log\MyFile.xml
  • /HostsConfigFilePath
    • Add this parameter to identify the path for the hosts.xml configuration file. You must use this file when you synchronize the workstations from an IP range or using CI names.
    • See the Update the WMI configuration from an IP range or with CI names section for more details.
    • Ex.: /HostsConfigFilePath:c:\program files\octopus\hosts.xml
  • /PurgeLogs

Operation Log Files

Files generated by the execution of the WMIUpdater program:

  • WMIUpdater_AAAAMMJJ_HHMMSS.log 
    • Log file generated automatically each time the program runs
  • WMIComputers.xml
    • File containing the data that will be imported in Octopus once the task is done

These files will be created in the folder at the executable "ESI.Octopus.WMIUpdaterApp.exe". In addition, these files may be requested for the analysis of issues related to WMI.

How it is Working for teams other than the IT team (#1)

The WMIUpdater application is supported in teams other than the IT team.

However, an Octopus administrator must make changes to the team's configuration.

To do this, you need to:

  • Select the menu Tools -> Reference data management... -> General -> Teams
  • Select the team 
  • Press the Execute button in the CI types section. This action will add the CI types required by WMIUpdater
  • Select the WMI Attributes tab
  • Press the Execute button. This action will add the attributes required by WMIUpdater

Update the WMI configuration of a workstation from Octopus

Updating the WMI configuration from Octopus enables you to quickly update in real time, a specific CI. This option can be handy during the diagnostic of a CI. From the configuration module, select the CI to te updated and then click on the Update the computer's configuration attributes (WMI). 



The update will start and you will get the hardware and software configuration of this specific CI. 

NOTE: You must have the administrator permission on the station that you want to update. However, no parameters can be used during this type of update (see the Parameters section for more information on the available options).

Detect User Installed Softwares

It is possible to detect software that has been installed for a specific user. Indeed, some installations ask if the software must be installed for the computer or for the current user.

This feature is disabled by default. 

To enable this option:

  • Tools -> Options
  • Go to section 3 - Importation general options -> WMI Update Manager options
  • Select Detect user installed softwares

How it works

When the feature is active, WMIUpdater will browse the list of installed software for users who are currently authenticated on the computer.

It is therefore important that the time slot of execution of WMIUpdater is done at the time when the users are present on their computer, i.e. when the computer is used.

If the computer is closed at run time, user software already added to the workstation will not be removed. This is to protect the configuration of the computer in case of absence of the user.

When the option Detect user installed softwares is checked, you will notice that the Manage user softwares removal option is also automatically checked by default.

It is used to disable the removal user softwares from a computer. This feature can come in handy when WMIUpdater encounters seats that are shared by multiple user accounts.

This option is also available directly from the WMIUpdater command line with the /NoUserSoftwareRemoval option.

This setting takes precedence over the global option.

Update the WMI configuration from a command line

The update from a command line allows you to update the whole of your workstations (or only a part) with the possibility to use different parameters. 

To run the WMIUpdater executable, you must open a command prompt (DOS) and position yourself in the Octopus folder you want to update. Then, you need to enter the following command:

ESI.Octopus.WMIUpdaterApp.exe /login:system /password:octo /team:1
Important : The folder must be the folder in which the ESI.Octopus.WMIUpdaterApp.exe program is located.


Example of a DOS command line

Before you run the command, you should validate the parameters that you want to use.

NOTE: If you make a mistake in the command line, the system will not give you an error message, it will ignore this parameter. Make sure you write the parameters correctly. 

Examples

  • WMI update without the local printers or the user profiles:
ESI.Octopus.WMIUpdaterApp.exe /login:system /password:octo /team:1 /NoPrintersDetection /NoUsersDetection
  • WMI update without updating the server with the data and with the modification of the XML file:
ESI.Octopus.WMIUpdaterApp.exe /login:system /password:octo /team1 /NoDbUpdate /OutputFileName:MyFile.xml
  • WMI update from the XML file instead of the network:
ESI.Octopus.WMIUpdaterApp.exe /login:system /password:octo /team:1 /NoExtraction:MonFichier.xml

Create an automated task for the WMI-Octopus synchronization

To automate the import from WMIUpdater, refer to Windows Schedules Tasks article.

Update the WMI configuration from an IP range or with CI names

NOTE: When using this method, you will import CIs to Octopus. It is not recommended to use this method if you have already imported your CIs from Active Directory (ADSIreaderApp.exe). When you do not know the names of the workstations that you want to synchronize, you can execute WMIUpdater from a range of IP addresses. This method requires the use of an XML file containing the IP addresses to check. In this case, the parameter /HostsConfigFilePath becomes mandatory. 

This is how you run the program:

ESI.Octopus.WMIUpdaterApp.exe /login:system /password:octo /team:1 /HostsConfigFilePath:Hosts.XML

Other parameters like /NoPrintersDetection or /NoUsersDetection can also be used.

Description of the HOSTS.XML File From an IP Range

The configuration file to synchronize the workstations from a range of IP addresses must be defined as follows:

<?xml version="1.0" encoding="utf-8" ?> 
   <wmiUpdater> 
      <host identificationType="IPAddress"> 
         <ipAddress start="10.25.125.1" end="10.25.125.255" /> 
         <ipAddress start="10.100.12.1" end="10.100.12.255" /> 
      </host> 
   </wmiUpdater>
  • It can contain several ranges of IP addresses

  • The file cannot contain an IP address with replacement characters like this: 

 

Description of the HOSTS.XML File From a List of CI Names

The file can also be used to find computer names instead of IP addresses.

  • For this, you need to change the identification type of the CI (IdentificationType)

The configuration file to synchronize the stations from their name must be defined as follows:

<?xml version="1.0" encoding="utf-8" ?> 
   <wmiUpdater> 
      <host identificationType="Name"> 
         <name>xp-sdoucet</name> 
         <name>xp-shamel</name> 
         <name>xp-mlavoie</name> 
      </host> 
   </wmiUpdater>

 

This type of configuration can be used when you cannot import from Active Directory or from any other external data source.

You can also use this method to synchronize only part of the workstations instead of the ones on the whole network.

Use WMIUpdater in a different domain or at a customer's

If you need to run WMI to update the computer configuration on a different domain and if you do not have a link between the domains, we suggest you to copy the Octopus folder to a USB key and connect to the customer's network to run the program. Of course, you will have to use the /NoDbUpdate parameter and will probably have to use the option of synchronizing from an IP range. Later on, once back on your network, you can run the program again with the /NoExtraction parameter to update the proper database.

Here are the steps:

  1. Copy the whole Octopus folder to a USB key
  2. Connect the USB key to a workstation of the domain you want to update (make sure .NET Framework 4 is installed on the computer from where you will run the command)
  3. Run the following command:
    ESI.Octopus.WMIUpdaterApp.exe /login:system /password:octo /team:1 /NoDbUpdate /OutputFileName:MyFile.xml
  4. Once the update completed, connect the USB key to a workstation in your domain and execute the following command:
    ESI.Octopus.WMIUpdaterApp.exe /login:system /password:octo /team:1 /NoExtraction:MyFile.xml

It is possible to use different parameters than the ones mentioned before. Do not forget, always use an administrator account of the domain you want to update.

WMI Error Report

After you have run the WMI synchronization with WMIUpdater, it is important to check the results from the various report available in Octopus. The following lists are available from the Configurations Module, in the Other section:

  • Computers never reached by WMI
  • Computers with WMI error
  • We recommand to add the following columns:
    Latest Attempt Date
    Latest Successfull Attempt Date
     



You can use the Computers with WMI error list to diagnose the errors from the last synchronization. For more help with WMI errors, lookup the Troubleshooting WMI errors wiki article.

To diagnose WMI problems, you can use the How to test WMI outside Octopus tool.


A falcultative option is also available WMI.AllNetworkAdapters.Enabled.
Enabling this setting will collect all physical network adapters (which correspond to hardware in the computer) - including wireless ones.
On the other hand, virtual NICs will not be included: VPN adapters, virtual NICs for internal routing, bridge to IPv6.

To request the addition of this option,, the authorized Octopus administrator must send a request to our ServiceDesk using the query Configuration / Data Modification

X
Help us improve our articles








Help us improve our articles