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

.. meta::
  :description: Quickstart - Installing WAPT Server on Windows
  :stickwords: Quickstart,WAPT,Server,Install,Windows

.. |date| date::

.. role:: red

.. _quickstart_wads_windows:

#############################
Quickstart - WADS for Windows
#############################

|

******************************************************************
Deploying a Windows machine in the domain, with offline connection
******************************************************************

  In this example, we will deploy a new machine to an Active Directory domain using a USB stick, with an offline connection.
  In this example we will deploy a Windows 11 machine in version 24h2.

  Deployment via USB is recommended for enhanced security.
  Additionally, the offline connection with DJOIN eliminates the need to pre-create a computer account in Active Directory.
  It also prevents storing an Active Directory user's login credentials in the XML file.


Requirements
============

  - A raw image of windows 11, 24h2 (downloaded from the `official Microsoft website <https://www.microsoft.com/fr-fr/software-download/windows11>`_).
  - The necessary system drivers for your machine to be deployed.
  - A configured DHCP server.
  - The WAPT server must be able to exchange with the machine to be deployed.
  - Have a dns resolution with a domain controller from the console.
  - Install the `WADS-REQUIREMENT-MININAL <https://wapt.tranquil.it/store/fr/tis-wads-requirement-minimal>`_ packages on the wapt console.
  - User with local administrator rights on the WAPT server.
  - User who signed the exe files ( Tools > Sign deploy file) and configuration files.
  - A empty usb stick

.. note::
  Official WADS documentation :ref:`here <wapt_ghosting_hosts>`

|

Demonstration video (WAPT 2.2 version):

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

|

Creating a WINPE USB stick
==========================

- Open the WAPT Console.
- Insert an USB stick on your computer.
- Go to *OS DEPLOY* panel.
- Click on :guilabel:`Create WinPE USB stick` →  (select your usb device).
- You can see the master certificate (Add your certificate if you don't see it). (1)
- Choose the keyboard language (for example: fr, en, es, pt, de, etc.) . (2)
- Check the other parameters before confirming with OK .

.. figure:: wapt-resources/WinPE_creation.png
  :scale: 75%
  :align: center
  :alt: WinPE creation

  WinPE creation

- You need to set up an account with *administrator privileges* to retrieve the key information **twice**.
- Remove the USB Stick.

|

Creating a XML configuration
============================

- Go to the configuration panel in *OS DEPLOY*.

.. figure:: wapt-resources/WAPT-Configuration_panel.png
  :align: center
  :alt: Configuration panel

  Configuration panel

- Click on the :kbd:`+`.
- Choose a configuration name. (1)
- Choose your iso. (2)
- Choose a configuration file by clicking on the document icon (in this quickstart we recommend **offline mode**, so we don't have to create the machine account in Active Directory). (3)
- Save, you have created a configuration in WAPT. (4)

.. figure:: wapt-resources/create_a_configuration_in_WADS.png
  :scale: 75%
  :align: center
  :alt: Create a configuration in WADS

  Create a configuration in WADS

- The configuration file is done.

Stages in the deployment of a computer
=========================================
|

On the computer to be deployed
------------------------------

- Turn off the machine.
- Insert the stick on the computer to be deployed.
- Start the computer and charge the **boot menu** (Use *F10* or *F12* when the computer starts up ), select your USB stick.
- Let the computer start.
- A box will appears, inform your login and password and give a name to the computer to be deployed.
- A new box appears **Registration Successful**.

.. figure:: wapt-resources/WADS-Computer_waiting_to_be_deployed.png
  :align: center
  :alt: Computer waiting to be deployed

  Computer waiting to be deployed

|

On the WAPT console
-------------------

- Return to the *OS DEPLOY* tab in the WAPT console and do a refresh ( :kbd:`F5`).
- Select the line of the computer name to be deployed:

  * Right-click > :guilabel:`Select a Configuration`, take the configuration you have done previously and :kbd:`OK`.
  * Right-click again> :guilabel:`Change Drivers`, select your drivers (warning; no exe, only extrated drivers) and :kbd:`OK`.

- Right-click on the computer to be deployed → :guilabel:`prepare Djoin` (this allows you to specify in your Active Directory the Organizational Unit where your new machine will be registered).

  * Fill in the domain. (1)
  * Fill in the domain controller. (2)
  * Click on :guilabel:`Connect to Domain and Reload OU`. (3)
  * Prefer the :guilabel:`overwrite` option in order to re-register the computer if necessary. (4)
  * Select your desired Organization Unit. (5)
  * Save

.. figure:: wapt-resources/Edit_Djoin.png
  :scale: 75%
  :align: center
  :alt: Edit Djoin

  Edit Djoin

- The comment :guilabel:`Exist` appears in the Djoin column.
- Select the computer to be deployed > Right-click start Deploy, an **X** appears in the :guilabel:`waiting to deploy` column.

|

On the computer to be deployed
------------------------------

- Click on :guilabel:`Retry Deployment`,The deployment will then resume.
- Once finished, **the machine will restart automatically**.
- Once the reboot is complete, your machine is ready to go. You can log in with a domain user.

**WADS deployment is complete and your machine is registered in your WAPT inventory.**
