Skip to main content

Automated Configuration of a Workstation

Publication Date:
2025-06-13
Submission Date:
2025-06-27
Submission Mode:
Omnivox

Context​

You are a system administrator in a company that regularly welcomes new employees. To simplify the initial configuration of workstations, you need to create a PowerShell script that automates these tasks.

danger

This script must be executed on a Windows 11 virtual machine. You can therefore freely modify the registry and system settings without concern.

Objectives of the Work​

Your PowerShell script must automatically perform the following actions:

1. Advanced Creation of a Folder Structure​

Your script must automatically create the following folder structure in the user's home directory ($HOME):

$HOME
│
├── Documents_Entreprise
│ ├── Projets
│ ├── Temporaire
└── Ressources
└── Documentation
└── Configuration_VPN.md

The Ressources folder and all subfolders and files it contains must be read-only. The Configuration_VPN.md file must be created with dummy content. This content is not evaluated, a simple sentence is sufficient.

2. Advanced Configuration of Environment Variables​

Your script must create or modify the following environment variables:

  • ENTREPRISE_FOLDER which points to the Documents_Entreprise folder created previously.
  • ENTREPRISE_BACKUP_SERVER which must contain the fictitious address of the backup server (\\backup.entreprise.local\partage).
  • ENTREPRISE_TEMP_PATH which points to the $HOME\Documents_Entreprise\Temporaire folder.

These variables must be available to the user and not just for the current process.

3. Advanced Modification of Windows Registry Keys​

Your script must backup automatically in the $HOME\Documents_Entreprise\Temporaire folder the registry keys that will be modified in a .reg file with a timestamp.

Your script must modify automatically the following settings in the Windows registry:

  • Enable the display of file extensions (key: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, value: HideFileExt = 0)
  • Enable the display of hidden files and folders (key: HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, value: Hidden = 1)

4. Automatic Verification and Report​

Your script must include an automatic verification feature for the tasks performed:

  • Verify that the folders have been created.
  • Verify that the environment variables are set correctly.
  • Verify that the registry keys have been modified.

The script must generate a report confirming that all steps have been successfully completed. This report must be written in a text file (rapport_configuration.txt) in the $HOME\Documents_Entreprise\Temporaire folder.

Deliverables​

You must submit the commented PowerShell script on Omnivox.

Evaluation Criteria​

  • Steps 1 to 4 are each worth 25 points.
  • For each step, well-commented code that works correctly gives all the points.
  • For each step, code that works but is not commented receives 2/3 of the points.
  • If your code does not work for a particular step, you can receive partial points if you have commented your code and explain what does not work.
  • For each step, no points will be awarded if the code does not work and no explanation is provided.