.. Reminder for header structure:
  Parts (H1)          : #################### with overline
  Chapters (H2)       : ******************** with overline
  Sections (H3)       : ====================
  Subsections (H4)    : --------------------
  Subsubsections (H5) : ^^^^^^^^^^^^^^^^^^^^
  Paragraphs (H6)     : """"""""""""""""""""

.. meta::
  :description: Using the WAPT Console advanced features
  :keywords: WAPT, advanced, features, documentation.

.. |ok| image:: wapt-resources/icon-ok.png
  :scale: 5%
  :alt: Feature available

.. |nok| image:: wapt-resources/icon-nok.png
  :scale: 5%
  :alt: Feature not available

.. role:: green
.. role:: orange
.. role:: red


.. _wapt_console_advanced:

########################################
Using the WAPT Console advanced features
########################################

.. _wapt_unit_package:

***************************************************************
Using Organizational Unit packages in WAPT |enterprise_feature|
***************************************************************

Working principle
=================

WAPT Enterprise offers Organizational Unit package functionality.

**unit packages automate software and configuration installations based on the Active Directory tree**.
It is a very powerful feature when used properly.

*Unit* packages are not explicitly assigned to the host (i.e. as dependencies in the host package) but are implicitly taken into account by the WAPT agent dependency engine during the WAPT upgrade.

.. note::

  If the computer is removed from an Organizational Unit, obsolete *unit* packages are removed.

The WAPT Agent is aware of its position in the Active Directory tree structure, therefore it knows the hierarchy of Organizational Units that concerns it, for example:

.. code-block:: bash

  DC=ad,DC=mydomain,DC=lan
  OU=Paris,DC=ad,DC=mydomain,DC=lan
  OU=computers,OU=Paris,DC=ad,DC=mydomain,DC=lan
  OU=service1,OU=computers,OU=Paris,DC=ad,DC=mydomain,DC=lan

If a *unit* package is defined on each Organisational Unit level, the WAPT Agent will automatically download WAPT packages and configurations that are attached to each level.
Using inheritance, WAPT will apply WAPT packages and dependencies that are attached to each Organizational Unit.

.. _create_edit_ou_packages:

Creating Organizational Unit packages
=====================================

You can create *unit* packages by :menuselection:`Right-clicking on an OU --> Create or Edit Organizational Unit package`.

.. image:: wapt-resources/wapt_console_organizational-unit_menu-list.png
  :align: center
  :alt: Menu options applicable to *unit* WAPT packages

A window opens and you are prompted to choose which packages to include in the *unit* bundle.

.. figure:: wapt-resources/wapt_console_unit-create-package_container-window.png
  :align: center
  :scale: 75%
  :alt: Adding WAPT packages to a unit bundle

  Adding WAPT packages to a unit bundle


Save the WAPT package and it will be deployed to all hosts belonging to the selected :abbr:`OU (Organizational Unit)`.

When you have a *unit* bundle, you will see a cube before the :abbr:`OU (Organizational Unit)` name in the WAPT Console.

.. image:: wapt-resources/wapt_console_organizational-unit_create-rule.png
  :align: center
  :alt: Organizational Unit with a rule set

.. _update_host_ou:

Actions available with Organizational Units
===========================================

.. image:: wapt-resources/wapt_console_organizational-unit_menu-list.png
  :align: center
  :alt: Menu options applicable to Organizational Units

.. list-table:: Menu items for creating or editing Organizational Unit package
  :header-rows: 1
  :widths: auto
  :align: center

  * - Menu item
    - Description
  * - The :guilabel:`Create or Edit Organizational Unit package` menu item
    - :ref:`Visit this documentation for more details on creating or editing OU packages <create_edit_ou_packages>`.
  * - The :guilabel:`Check updates on all hosts of this OU` menu item
    - Allows to upload the current state of the host to the WAPT Server and force the WAPT Server to display whether the hosts in the selected :abbr:`OU (Organizational Unit)` have pending updates.
  * - The :guilabel:`Apply upgrades on all hosts of the OU` menu item
    - Allows to apply waiting WAPT :ref:`updates <update_host>` and :ref:`upgrades <upgrade_host>` on the all hosts in the :abbr:`OU (Organizational Unit)`.

.. note::

  You may filter how hosts are displayed based on the Active Directory :abbr:`OU (Organizational Units)` they belong to.

.. image:: wapt-resources/wapt_console_include-subfolders-in-search_menu_item.png
  :align: center
  :alt: Menu option to include hosts in subfolders

The checkbox :guilabel:`Include hosts in subfolders` allows to display hosts in subfolders.

.. _fake_ou:

Faking Organizational Units for hosts
=====================================

It can happen that some specific hosts cannot be joined to an Active Directory domain.

Therefore, these hosts do not show up in the Active Directory Organizational Units in the WAPT Console.

To make all hosts show up in the WAPT Console under the right Organizational Unit, whether they are joined to an AD domain or not, WAPT allows to specify a *fake* Organizational Unit in the WAPT Agent configuration file.

The benefits of this very useful trick are:

* You can manage out-of-domain, workgroup and Windows Home Edition hosts with WAPT as if they were joined to the Active Directory.

* Out-of-domain, workgroup and Windows Home Edition hosts are now showing up in the Active Directory tree view in the WAPT Console.

.. note::
  
  You can also change the ad location of the machine if you want to visually change its location on the WAPT console. (This package is only visual, in no way does it change the actual location of the machine in the active directory).


To setup a *fake* Organizational Unit on hosts, create an :file:`Host agent dynamic configuration`, then go to :file:`Advanced Editing` > :file:`host_organizational_unit_dn`.

fill in the field with the syntaxe for example : 

.. code-block:: text

  OU=WINDOWS,OU=WORKSTATION,DC=FAKE,DC=LAN


Example :

.. figure:: wapt-resources/wapt-fake_ou_creation.png
  :align: center
  :scale: 75 %
  :alt: Fake OU Creation

  Fake OU Creation

Once the package has been validated, it can be allocated to a machine or an OU.

.. _customize_columns:

***********************
Customizing the columns
***********************

By using the right-click context menu on the column bar, you can choose which columns you want to show or hide.

.. figure:: wapt-resources/wapt_console_column_management.png
  :align: center
  :scale: 75%
  :alt: Column management in the WAPT Console

  Column management in the WAPT Console

How to rename grids
===================

From the console, go to  :guilabel:`view` , then :guilabel:`Display preferences`.

.. figure:: wapt-resources/wapt_console-display-preferences-from-menu.png
  :scale: 75%
  :align: center
  :alt: WAPT Console display preferences

  Wapt console display preferences

Then, check **enable advanced display and grid features** and **Show Developers features**.

.. figure:: wapt-resources/wapt_console_display_preferences.png
  :scale: 75%
  :align: center
  :alt: WAPT Console display preferences

  waptconsole display preferences

Return to the wapt console, and right-click on a machine in the inventory. Select **Advanced customize of table**.

.. figure:: wapt-resources/wapt_console_advanced_grids_configurations.png
  :scale: 50%
  :align: center
  :alt: Advanced grids configurations

  Advanced grids configurations

Select a column and access its name.

.. figure:: wapt-resources/waptconsole_change_column_name.png
  :scale: 75%
  :align: center
  :alt: Change column name

  Change column name
  
*********************************
Forcing WAPT package installation
*********************************

Forced installation refers to re-executing the :file:`setup.py` script of a WAPT package, even if the package is already marked as installed on the system.

**Why Use Forced Installation ?**

* A forced installation can verify that any outdated configuration or remnants from a previous version of the package have been properly removed.

* If a package is installed but corrupted, reinstallation ensures a fresh setup without requiring a version change.

WAPT typically relies on registry keys or other markers to determine if a package is installed.
If these markers are present but the software is not functioning correctly, WAPT might skip reinstallation unless forced.

.. Warning::
  Forced installations should be performed carefully, as they may overwrite local configurations or disrupt ongoing processes.

  Ensure that the potential impact is evaluated before proceeding.

**How to force a package installation ?**

* For **one computer** :
  
  Navigate to the :guilabel:`Overview` tab in the WAPT Console, right-click on the desired package and select :kbd:`Force_Install`.

* For **multiple computer** :

  Go to the :guilabel:`WAPT Packages` section. Locate the package you want to force. Right-click on the package and select :kbd:`Edit_Package`.
  Enable the :guilabel:`Show More Attributes` option. Set a past date in the :guilabel:`Force Install Before` field.

.. figure:: wapt-resources/wapt-console_force_a_package.png
  :scale: 75%
  :align: center
  :alt: WAPT Console force a package

  WAPT Console force a package

These actions will ensure the package is reinstalled on the targeted machines.

*******************************************
Multi-Factor Authentication by WAPT Console
*******************************************

The choice was made in favour of TOTP (Time-Based One-time Password). 
This is a temporary code generated by an algorithm and linked to the current time. The code is generated for thirty seconds.

.. hint ::
  It is important that your wapt server and the management consoles are in the same time because the TOTP generates a code every thirty seconds.

.. note ::
  Since the 2.6.0.16676, in the **CSPN toe** or if you add **require_totp_for_admin** option in the :file:`wapt-get.ini`. 

    * This applies to password-based authentication (admin, passwd, ldap, token).
    * Without require_totp_for_admin, admin rights are stripped unless TOTP is verified.


How to activate MFA
===================

.. warning::

  The MFA method is only valid when using LDAP or password authentication methods. With Kerberos, MFA is not prompted.

Go to :menuselection:`Server --> Add/Change 2FA TOTP token`.

.. figure:: wapt-resources/wapt-console_Activate_TOTP.png
  :scale: 75%
  :align: center
  :alt: WAPT Console Activate TOTP

  WAPT Console Activate TOTP

Use your second device (smartphone,YubiKey, etc.) and get the code who will appears in the picture. Put the code in the dedicated field.

A confirmation window appears showing ; 2FA OTP token set on your account.

You can restart your WAPT Console. Now the TOTP Code field appears in the window of authentication.

.. figure:: wapt-resources/wapt-console_Authentification_TOTP.png
  :scale: 75%
  :align: center
  :alt: WAPT Console Authentification TOTP

  WAPT Console Authentification TOTP

.. Note::
  
  When activating TOTP, you need to take into account certain changes in behaviour:

  - When connecting to the WAPT server URL, the OTP (One-Time Password) code must be added between braces.  
    Example: **password{OTPcode}**.

  - When registering a new agent machine, use the :guilabel:`wapt-get register --with-otp` command.  
    Identify the login and password as **password{OTPcode}**.

How to disable MFA
==================

You need to use an **admin account**.

Go to :guilabel:`Server` → :guilabel:`WAPT Users rights (ACLS)`.

Do a right-click on which you wish to disable 2FA :kbd:`Remove_2FA`. 

.. figure:: wapt-resources/wapt-console_ACL_disable_2FA.png
  :scale: 75%
  :align: center
  :alt: wapt console ACL Users 2FA

  WAPT console ACL Users 2FA

.. _add_plugins_console:

**********************************
Adding plugins in the WAPT Console
**********************************

To add custom plugins, go to the :menuselection:`Tools --> Preference --> Plugins` Tab.

.. figure:: wapt-resources/wapt_console_plugins-empty_container-window.png
  :scale: 60%
  :align: center
  :alt: Creating a custom plugin in the WAPT Console

  Creating a custom plugin in the WAPT Console

Click :guilabel:`Add` to add a plugin, then edit the corresponding columns.

.. list-table::
  :header-rows: 1
  :widths: 15,55

  * - Column
    - Description
  * - Name
    - Name that will appear in the menu.
  * - Executable
    - Path of the executable that will be executed.
  * - Arguments
    - Arguments passed to the executable.

      All the parameters that are diplayed in the grid can be used, like {ip}, {uuid} or {computer_fqdn}. 

      To get the parameter name, you may right-click on the column header, and the name will be displayed in parentheses beside the column name.

Plugins will then appear in the menu:

.. figure:: wapt-resources/wapt_console_plugins-full_container-window.png
  :scale: 60%
  :align: center
  :alt: Creating a custom plugin in the WAPT Console

  Creating a custom plugin in the WAPT Console


.. _wapt_usage_advanced:

**********************************
Using the WAPT System Tray utility
**********************************

The WAPT System Tray utility is a systray program working in user context.

The WAPT System Tray utility launches at logon if you enable it with the following package: :download:`tis-enable-wapttray <https://wapt.tranquil.it/store/fr/tis-enable-wapttray>`.
The icon will show up in the Windows tray toolbar.

One can also launch the WAPT System Tray utility manually on :file:`C:\\Program Files (x86)\\wapt\\wapttray.exe`.

Functionalities of the WAPT System Tray utility
===============================================

.. tabs::

  .. tab:: Main functions

    .. image:: wapt-resources/wapt_tray_menu-list.png
      :align: center
      :alt: The WAPT System Tray utility in Windows notification tray

    .. list-table:: List of functionalities of the WAPT System Tray utility
      :header-rows: 1

      * - Action
        - Description
      * - :guilabel:`View software status`
        - Launches the local web interface in a web browser.
      * - :guilabel:`Update software inventory`
        - Refreshes the list of available WAPT packages.
          Double-clicking on the tray icon brings about the same effect.
      * - :guilabel:`Install updates`
        - Launches the installation of pending upgrades.
      * - :guilabel:`Run WAPT Self-service`
        - Launches the WAPT Self-Service.
      * - :guilabel:`Run WAPT Console`
        - Launches the WAPT Console.
      * - :guilabel:`Configuration`
        - See following table for detailed list of options.
      * - :guilabel:`Configuring all installed packages for your own session`
        - Launches a :command:`session-setup` to configure user environment for all packages installed on the host.
      * - :guilabel:`View tasks`
        - Display the task list on the local web interface in the web browser.
      * - :guilabel:`Cancel current task`
        - Cancels a running task on WAPT Agent.
      * - :guilabel:`Cancel all current tasks`
        - Cancels all running tasks on WAPT Agent.
      * - :guilabel:`WAPT service running`
        - Stops and reloads the WAPT service.
      * - :guilabel:`Quit`
        - Closes the tray icon without stopping the local WAPT service.

  .. tab:: Configuration functions

    .. image:: wapt-resources/wapt_tray_configuration_menu-list.png
      :align: center
      :alt: Configuration of the WAPT System Tray utility

    .. list-table:: List of configuration options for the WAPT System Tray utility
      :header-rows: 1

      * - Action
        - Description
      * - :guilabel:`View configuration file`
        - Opens the :file:`C:\\Program Files (x86)\\wapt\\wapt-get.ini` file with :term:`Local Administrator` privileges (credentials may be asked).
      * - :guilabel:`Reload network related service configuration`
        - Reloads the connection to the WAPT Server in the event of a network reconfiguration.
      * - :guilabel:`Save this host to the WAPT Server`
        - Updates the host's inventory with the WAPT Server.
      * - :guilabel:`About this host`
        - Launches the local web interface in a browser file with :term:`Local Administrator` privileges (credentials may be asked) to display the host inventory.

Video demonstration
===================


.. youtube:: 9iG36IeHuVc
   :align: center
   :width: 50%


.. _waptexit:

***************************
Using the WAPT Exit utility
***************************

The WAPT Exit utility allows to upgrade and install WAPT packages when a host is shutting down, at the user's request, or at a scheduled time.

The mechanism is simple.
If WAPT packages are waiting to be upgraded, they will be installed.

The WAPT Exit method is very effective in most situation because it does not require the intervention of the :term:`User` or the :term:`Administrator`.

.. image:: wapt-resources/wapt_exit_dialog-box.png
  :align: center
  :alt: Main window of the WAPT Exit utility

The WAPT Exit utility executes by default on shutdown, it is installed with the WAPT Agent.

The behavior of the WAPT Exit utility is customizable in :ref:`wapt-get.ini <waptexit_ini_file_options>` of the WAPT Agent.


.. warning::

  If a WAPT task is running, the shutdown of the host is suspended until the task has completed or timed-out.

The WAPT Exit utility can be manually executed by running :file:`C:\\Program Files (x86)\\wapt\\waptexit.exe`.

.. _schedule_task_waptexit:

Triggering the WAPT Exit utility with a scheduled task |enterprise_feature|
===========================================================================

One can deploy a :abbr:`GPO (Group Policy Object)` or a WAPT package that will trigger the WAPT Exit utility at a pre-scheduled time.

**Triggering the WAPT Exit utility with a scheduled task is best suited for servers that are not shutdown frequently.**


You may adapt the procedure :ref:`Import a task schedule in a wapt package <task_schedule_in_package>` to trigger the WAPT Exit utility script at the most appropriate time.

You can use the following script for your scheduled task, adapted to your need:

.. note::

  If you don't want to update software that is already started by a user, you can add this command to the arguments of you task schedule.

  .. code-block:: python

    waptpython -c "from waptservice.enterprise import start_waptexit start_waptexit('',{'only_priorities':False,'only_if_not_process_running':True, 'install_wua_updates':False,'countdown':300},'schtask')"

After you export your task schedule, you can adapt the python script below in a wapt package.

.. code-block:: python

  # -*- coding: utf-8 -*-
  from setuphelpers import *

  def install():
    run('schtasks /CREATE /RU SYSTEM /TN taskname /xml filename.xml')
    WAPT.remove_upgrade_shutdown_policy()

  def uninstall():
    run('schtasks /DELETE /TN taskname /F')

.. warning::

  * All running software that are upgraded may be killed with possible loss of data.

  * The WAPT Exit utility may fail to upgrade a software program if a software that you are upgrading is in the :code:`impacted_process` list of the :file:`control` file.
    See :ref:`below <impacted_process>` for more information.

  * The method of triggering the WAPT Exit utility at a scheduled time is the least recommended method for desktops.
    It is better to let the WAPT Exit utility execute at shutdown or on user request.

The WAPT Exit utility settings in wapt-get.ini
==============================================

It is possible to :ref:`modify the behavior of the WAPT Exit utility <waptexit_ini_file_options>` in the :file:`wapt-get.ini`.

It is also possible to modify the behavior of the WAPT Exit utility directly from the command line, see the next points.

The WAPT Exit utility options with the command line
===================================================

Avoiding the cancellation of upgrades
-------------------------------------

To disable the interruption of the installation of updates you can run the WAPT Exit utility with the argument:

.. code-block:: bash

  waptexit.exe -allow_cancel_upgrade = True

Increasing the trigger time in the WAPT Exit utility
----------------------------------------------------

To specify the wait time before the automatic start of the installations you can start the WAPT Exit utility with the argument:

.. code-block:: bash

  waptexit.exe -waptexit_countdown = 10000

.. _impacted_process:

Avoiding to interrupt user activity
-----------------------------------

To tell WAPT not to run an *upgrade* of software titles currently running on the host (:code:`impacted_process` attribute of the WAPT package), the WAPT Exit utility may be run with the argument :code:`-only_if_not_process_running`.

.. code-block:: bash

  waptexit.exe -only_if_not_process_running = True

If not specified, the WAPT Exit utility will take the value indicated in :file:`C:\\Program Files (x86)\\wapt\\wapt-get.ini`.

Launching the installation of WAPT packages with a special level of priority
----------------------------------------------------------------------------

To tell WAPT to only upgrade WAPT packages with a specific priority, you can run the WAPT Exit utility with the argument :code:`-priorities`.

.. code-block:: bash

  waptexit.exe -priorities = high

Registering/ unregistering the WAPT Exit utility
------------------------------------------------

To register or unregister the WAPT Exit utility in local shutdown group strategy scripts, use:

* to enable the WAPT Exit utility at host shutdown:

.. code-block:: bash

  wapt-get add-upgrade-shutdown

* to disable the WAPT Exit utility at host shutdown:

.. code-block:: bash

  wapt-get remove-upgrade-shutdown

Video demonstration
-------------------

.. youtube:: vjFgpxrWESk
   :align: center
   :width: 50%

****************************************************************
Customizing WAPT for better user acceptance |enterprise_feature|
****************************************************************

It is possible to customize WAPT with your company colors to improve user acceptance.

3 components of WAPT are customizable:

* the WAPT Exit utility;

* the WAPT Self-Service;

* the WAPT Message utility.

It is possible to use the same logo for all programs.

Place the image in :file:`<wapt_folder>\\custom_templates`.

The logo **MUST** be named :file:`wapt-logo.png`.

The recommended size of the logo is 200X55 and the recommended format is :mimetype:`.png`.

For a different logo per program, see next points.

The WAPT Exit utility
=====================

It is possible to customize the WAPT Exit utility by placing the image you want in :file:`<wapt_folder>\\custom_templates`.

The logo **MUST** be named :file:`waptexit-logo.png`.

The recommended size of the logo is 200X55 and the recommended format is :mimetype:`.png`.

If the file is not defined, WAPT uses by default :file:`wapt-logo.png`.

WAPT Self-Service
=================

It is possible to customize the WAPT Self-Service utility by placing the image you want in :file:`<wapt_folder>\\custom_templates`.

The logo **MUST** be named :file:`waptself-logo.png`

The recommended size of the logo is 200X55 and the recommended format is :mimetype:`.png`.

If it is not defined, WAPT uses in order :file:`waptexit-logo.png`, :file:`waptself-logo.png` and finally the default WAPT logo.

.. _custom_icon_waptmessage:

WAPT Message
============

It is possible to customize the WAPT Message utility by placing the image you want in :file:`<wapt_folder>\\custom_templates`.

The logo **MUST** be named :file:`waptmessage-logo.png`.

The recommended size of the logo is 200X55 and the recommended format is :mimetype:`.png`.

If it is not defined, WAPT uses in order :file:`waptexit-logo.png`, :file:`waptself-logo.png` and finally the default WAPT logo.

.. _waptconsole_ini_file_options:

********************************************************
Customizing the WAPT Console with its configuration file
********************************************************

.. note::

  the WAPT Console configuration is stored in 2 locations:

  * :file:`C:\\Users\\%username%\\AppData\\Local\\waptconsole\\waptconsole.ini`.

  * :file:`C:\\Users\\%username%\\AppData\\Roaming\\waptconsole\\waptconsole.ini`.

  These files are automatically generated when the :program:`waptconsole` is first launched and it is generated from the :file:`wapt-get.ini` file configured on the :term:`Administrator`'s workstation.

Description of available sections
=================================

.. list-table:: Description of available sections for the WAPT Agent
  :header-rows: 1
  :widths: auto

  * - Section
    - Description
  * - ``[global]``
    - Defines the global WAPT Console options.
  * - ``[sections]``
    - Defines external repository options.
      ``[wapt-template]`` :ref:`repositories <wapt_multi-repository>`
  * - ``[waptwua]``
    - Defines the WUA options.

All sections are detailed below.

Others sections present on :file:`C:\\Users\\%username%\\AppData\\Roaming\\waptconsole\\waptconsole.ini` are not editable manually, therefore they are not detailed.

.. warning::

  For parameters both present in :file:`wapt-get.ini` and :file:`waptconsole.ini`, values are set in :file:`wapt-get.ini` and copied to :file:`waptconsole.ini`.
  Do not edit manually these parameters.

Description of available options by section
===========================================

[global]
--------

Several options are available in the ``[global]`` section of the :file:`waptconsole.ini` file.

.. white_toggle::
  :titleen: Description of available options in AppData\\Local
  :titlefr: Description des options disponibles dans AppData\\Local

  .. list-table::
    :header-rows: 1
    :widths: auto

    * - Options (Default Value)
      - Description
      - Example
    * - :code:`advanced_mode` (default ``False``)
      - Launches the WAPT Console in debug mode.
      - advanced_mode = True
    * - |enterprise_feature| :code:`allow_remote_reboot` (default ``False``)
      - Allows to reboot the selected host(s) remotely from the WAPT Console.
      - allow_remote_reboot = True
    * - |enterprise_feature| :code:`allow_remote_shutdown` (default ``False``)
      - Allows to shut down the selected host(s) remotely from the WAPT Console.
      - allow_remote_shutdown = True
    * - :code:`client_certificate` (default ``None``)
      - Defines whether the remote repository is using Client Side SSL Authentification.
      - client_certificate = C:\\private\\org-coder.crt
    * - :code:`client_private_key` (default ``None``)
      - Defines whether the remote repository is using Client Side SSL Authentification.
      - client_private_key = C:\\private\\org-coder.pem
    * - :code:`check_certificates_validity` (default ``False``)
      - Forces the package certificate's date and CRL to be verified.
      - check_certificates_validity = True
    * - :code:`default_maturity` (default ``None``)
      - Defines the default upload maturity for WAPT packages.
      - default_maturity = PROD
    * - :code:`default_package_prefix` (default ``tis``)
      - Defines the default prefix for new or imported packages. Prefix is case sensitive, we recommand to use lower case.
      - default_package_prefix = doc
    * - :code:`default_sources_root` (default :file:`C:\\waptdev` on Windows or :file:`~/waptdev` on Linux)
      - Defines the directory for storing packages while in development.
      - default_sources_root = C:\\waptdev
    * - :code:`grid_hosts_plugins` (default ``W10=``)
      - Lists :ref:`external plugins <add_plugins_console>` for the WAPT Console.
        Default is ``W10=`` because ``[]`` is encoded in base64.
      - grid_hosts_plugins = W3siZXhlY3V0YWJsZSI6ImV4cGxd
    * - :code:`host_profiles` (default ``None``)
      - Defines a WAPT package list that the WAPT Agent **MUST** install.
      - host_profiles = tis-firefox,tis-java
    * - :code:`hiberboot_enabled` (default ``False``)
      - Disables Hiberboot on Windows 10 to make :program:`waptexit`
      - hiberboot_enabled = True
    * - :code:`http_proxy` (default ``None``)
      - Defines the address of the proxy server in the WAPT Console.
      - http_proxy = https://proxy.mydomain.lan
    * - :code:`last_usage_report` (default ``None``)
      - Provides the date when the WAPT Console was last used.
      - last_usage_report = 12/05/2021 18:45:51
    * - :code:`lastwaptserveruser` (default ``None``)
      - Provides the last user logged on this WAPT Console.
      - lastwaptserveruser = admin
    * - :code:`max_gpo_script_wait` (default ``180``)
      - Defines the timeout for GPO execution at computer shutdown (in seconds).
      - max_gpo_script_wait = 360
    * - :code:`personal_certificate_path` (default ``None``)
      - Defines the path to the certificate associated with the Administrator's private key.
      - personal_certificate_path = C:\\private\\mykey.crt
    * - :code:`pre_shutdown_timeout` (default ``180``)
      - Defines the timeout for scripts at computer shutdown (in seconds).
      - pre_shutdown_timeout = 360
    * - :code:`repo_url` (default your WAPT repo address)
      - Defines the address of the main WAPT repository.
      - repo_url = https://srvwapt.mydomain.lan/wapt
    * - :code:`send_usage_report` (default ``True``)
      - Allows the WAPT Console to send anonymous statistics to Tranquil IT.
        Set to False to disable telemetry.
      - send_usage_report = True
    * - :code:`sign_digests` (default ``sha256``)
      - Lists allowed signature algorithms for the WAPT packages.
      - sign_digests = sha1
    * - |enterprise_feature| :code:`use_ad_groups` (default ``False``)
      - Allows using :ref:`unit packages <unit_packages>`.
      - use_ad_groups = True
    * - :code:`use_fqdn_as_uuid` (default ``False``)
      - Allows using the :abbr:`FQDN (Fully Qualified Domain Name)` rather than the BIOS UUID as the unique host identifier in WAPT.
      - use_fqdn_as_uuid = True
    * - :code:`use_kerberos` (default ``False``)
      - Allows using kerberos authentication for initial registration of WAPT Agents with the WAPT Server.
      - use_kerberos = True
    * - :code:`use_hostpackages` (default ``False``)
      - Allows using :ref:`host packages <host_packages>`.
      - use_hostpackages = True
    * - :code:`use_http_proxy_for_repo` (default ``False``)
      - Allows using a proxy to connect to the main WAPT repository from the WAPT Console.
      - use_http_proxy_for_repo = True
    * - :code:`use_http_proxy_for_server` (default ``False``)
      - Allows using a proxy to connect to the WAPT Server from the WAPT Console.
      - use_http_proxy_for_server = True
    * - |enterprise_feature| :code:`use_repo_rules` (default ``False``)
      - Allows using :ref:`replication for repositories <replication_usage>`.
      - use_repo_rules = True
    * - :code:`verify_cert` (default ``False``)
      - Allows :ref:`verifying SSL / TLS certificate <activating_HTTPS_certificate_verification>`.
      - verify_cert = True
    * - :code:`wapt_server` (default ``None``)
      - Defines the address of the WAPT Server.
      - wapt_server = https://srvwapt.mydomain.lan

.. white_toggle::
  :titleen: Description of available options on AppData\\Roaming
  :titlefr: Description des options disponibles sur AppData\\Roaming

  .. list-table::
    :header-rows: 1
    :widths: auto

    * - Options (Default Value)
      - Description
      - Example
    * - :code:`advanced_mode` (default ``False``)
      - Launches the WAPT Console in debug mode.
      - advanced_mode = True
    * - :code:`enable_external_tools` (default ``False``)
      - Displays the actions that call external applications (RDP, Windows tools etc...).
      - enable_external_tools = True
    * - :code:`enable_management_features` (default ``False``)
      - Displays the button to create self-signed certificates or to create the WAPT Agent's installer.
      - enable_management_features = True
    * - :code:`hide_unavailable_actions` (default ``False``)
      - Hides actions that are not available for the WAPT Agent
      - hide_unavailable_actions = True
    * - :code:`HostsLimit` (default ``2000``)
      - Limits hosts displayed in the WAPT Console.
      - HostsLimit = 300
    * - :code:`language` (default language on the WAPT Client)
      - Forces the default langage for GUI (not for package filtering)
      - language = en
    * - :code:`lastappinifilename` (default ``None``)
      - Defines the :mimetype:`.ini` file used to store the WAPT Console configuration.
      - lastappinifilename = C:\\Users\\%username%\\AppData\\Roaming\\waptconsole\\waptconsole.ini
    * - :code:`show_host_audit_data_tab` (default ``False``)
      - Displays the :guilabel:`Audit data` tab on host inventory.
      - show_host_audit_data_tab = True
    * - |enterprise_feature| :code:`use_ad_groups` (default ``False``)
      - Allows using :ref:`unit packages <unit_packages>`.
      - use_ad_groups = True
    * - :code:`use_fqdn_as_uuid` (default ``False``)
      - Forces the use of the :abbr:`FQDN (Fully Qualified Domain Name)` instead of the uuid BIOS as the unique host identifier in WAPT.
      - use_fqdn_as_uuid = True
    * - :code:`waptconsole.version` (default ``None``)
      - Displays the version of the WAPT Console.
      - waptconsole.version = 2.0.0.9424
    * - :code:`waptwua_enabled` (default ``False``)
      - Allows displaying the :guilabel:`Windows Update` tab on the WAPT Console.
      - waptwua_enabled = True

.. _wapt_repository_ini_file_options:

[sections]
----------

You may add several external repositories by adding ``[sections]`` in :file:`C:\\Users\\%username%\\AppData\\Local\\waptconsole\\waptconsole.ini`.

.. warning::

  This parameter can be configured both in the WAPT Agent configuration and in the WAPT Console configuration :file:`C:\\Users\\%username%\\AppData\\Local\\waptconsole\\waptconsole.ini`.

  For information on configuring the WAPT Agent, please refer to :ref:`this point <wapt_agent_ini_file_options>`.

See available parameters and configurations by visiting :ref:`this documentation on setting up multiple repositories <wapt_console_multi-repository>`.


Managing Independently several WAPT Server profiles in the WAPT Console |enterprise_feature|
============================================================================================

You can connect the WAPT Console to several WAPT Servers.

To do so, go to :file:`%localappdata%\\\waptconsole`, copy the :file:`waptconsole.ini` file and rename it, for example :file:`waptconsole2.ini`.

**Modify** the new file with the second WAPT Server parameters (ex: IP / DNS, prefix, etc).


.. figure:: wapt-resources/wapt_console_several_profiles.png
  :align: center
  :alt: Window showing connections with several WAPT Server profiles

  Window showing connections with several WAPT Server profiles

.. note::

  You can have several WAPT Server connection profiles but the WAPT Servers do not communicate between them.

.. note::

  This hint can be utilized to modify the certificate. Is as follows: 
  
  .. code-block::

    personal_certificate_path=C:\Users\Administrator\Desktop\name\name.crt


Managing at the same time several WAPT servers |enterprise_feature|
===================================================================

To do so, go to :file:`%localappdata%\waptconsole`, copy the :file:`waptconsole.ini` file and rename it, for example :file:`multi-waptconsole.ini`.

**ADD** a new section with the second WAPT Server parameters (ex: IP / DNS, prefix, etc).

Example for add the srvwapt2:

.. code-block::
  
  [global]
  default_package_prefix=tis
  wapt_server=https://srvwapt.jarnaud.tranquil.it
  repo_url=https://srvwapt.jarnaud.tranquil.it/wapt
  verify_cert=0
  personal_certificate_path=C:\Users\Administrator\Desktop\jarnaud\jarnaud.crt


  [srvwapt2]
  wapt_server=https://srvwapt2
  repo_url=https://srvwapt2/wapt
  verify_cert=C:\Users\Administrator\AppData\Local\waptconsole\ssl\server\srvwapt2.crt
  personal_certificate_path=C:\Users\Administrator\private-wapt2\ca-wapt2.crt

Then you can launch the :file:`waptconsole.exe` after you open the console you can travel to different server with the case Wapt servers.

.. figure:: wapt-resources/choose_your_wapt_server.png
  :align: center
  :scale: 75%
  :alt: choose your wapt server in the waptconsole

  choose your wapt server in the waptconsole

.. warning::
  
  When importing a WAPT package in a multi-WAPT console context, the package will be imported into the global repositories, not all WAPT servers.

.. warning::

  When using the multi-WAPT console context, ensure that the number of machines in the license matches across all servers. For example, if your license for Server 1 is 100 and for Server 2 is 50, you will need 100 licenses for Server 2 as well.