Skip to content

Barikad/gestionimprimantelocale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PowerShell Windows

Note sur le Dépôt Officiel

Ce projet est maintenu sur le GitLab de la Mairie de Villejuif. Des miroirs en lecture seule peuvent exister sur d'autres plateformes (GitHub, etc.), mais cette instance est la seule source officielle. Toutes les contributions (tickets, requêtes de fusion) doivent y être soumises.


Note on the Official Repository

This project is maintained on the Mairie de Villejuif's GitLab. Read-only mirrors may exist on other platforms (GitHub, etc.), but this instance is the single source of truth. All contributions (issues, merge requests) must be submitted here.

English Version below

Gestionnaire d'Imprimantes Locales

📋 Description

GestionImprimanteLocale.ps1 est un script PowerShell interactif conçu pour simplifier la création, la configuration et la gestion d'imprimantes locales sous Windows. Il offre une interface utilisateur conviviale avec des valeurs par défaut personnalisables pour automatiser le déploiement d'imprimantes.

✨ Fonctionnalités

  • Création, suppression et affichage des imprimantes.
  • Support des ports TCP/IP et USB.
  • Configuration avancée (drivers, partage, imprimante par défaut).
  • Interface de menu interactive et colorée.
  • Test d'impression après création.

🔧 Prérequis

  • Windows 10/11 ou Windows Server 2016+.
  • PowerShell 5.0 ou supérieur.
  • Privilèges administrateur pour exécuter le script.

🚀 Utilisation

  1. Ouvrez une console PowerShell en tant qu'administrateur.
  2. Naviguez jusqu'au répertoire du script.
  3. Exécutez la commande :
    .\GestionImprimanteLocale.ps1
  4. Suivez les instructions du menu.

Interface du menu principal

=== MENU PRINCIPAL ===
1. Créer une nouvelle imprimante
2. Afficher les imprimantes existantes
3. Afficher les drivers disponibles
4. Supprimer une imprimante
5. Quitter

📖 Guide d'utilisation détaillé

Le script vous guidera à travers les étapes suivantes pour la création :

Étape 1 : Nom de l'imprimante

Nom de l'imprimante [Mon_Imprimante_Locale]: HP_LaserJet_Bureau

Étape 2 : Type de connexion (TCP/IP ou USB)

Type de connexion :
1. Port TCP/IP (Imprimante réseau)
2. Port USB local
Choisissez le type (1 ou 2): 1

Étape 3 : Sélection du driver

Drivers disponibles sur le système :
  1. Generic / Text Only
  2. HP LaserJet P1005
  3. Canon LBP2900
  ...
Nom du driver [Generic / Text Only]: HP LaserJet P1005

Étape 4 : Confirmation et options

Confirmer la création de l'imprimante? (O/N): O
Définir comme imprimante par défaut? (O/N): O
Partager l'imprimante sur le réseau? (O/N): O
Nom de partage [ImprimantePartagee]: HP_Partagee
Effectuer un test d'impression? (O/N): O

⚙️ Configuration

Les valeurs par défaut (nom de l'imprimante, IP, etc.) peuvent être modifiées directement au début du fichier de script pour s'adapter à votre environnement.


Local Printer Manager (English Version)

📋 Description

GestionImprimanteLocale.ps1 is an interactive PowerShell script designed to simplify the creation, configuration, and management of local printers in Windows. It provides a user-friendly interface with customizable default values to automate printer deployment.

✨ Features

  • Create, delete, and list printers.
  • Support for TCP/IP and USB ports.
  • Advanced configuration (drivers, sharing, default printer).
  • Interactive and colored menu interface.
  • Print test after creation.

🔧 Prerequisites

  • Windows 10/11 or Windows Server 2016+.
  • PowerShell 5.0 or higher.
  • Administrator privileges to run the script.

🚀 Usage

  1. Open a PowerShell console as an administrator.
  2. Navigate to the script's directory.
  3. Run the command:
    .\GestionImprimanteLocale.ps1
  4. Follow the on-screen menu instructions.

Main Menu Interface

=== MAIN MENU ===
1. Create a new printer
2. List existing printers
3. List available drivers
4. Delete a printer
5. Exit

📖 Detailed Usage Guide

The script will guide you through the following steps for creation:

Step 1: Printer Name

Printer Name [My_Local_Printer]: HP_LaserJet_Office

Step 2: Connection Type (TCP/IP or USB)

Connection Type:
1. TCP/IP Port (Network Printer)
2. Local USB Port
Choose type (1 or 2): 1

Step 3: Driver Selection

Available drivers on the system:
  1. Generic / Text Only
  2. HP LaserJet P1005
  3. Canon LBP2900
  ...
Driver Name [Generic / Text Only]: HP LaserJet P1005

Step 4: Confirmation and Options

Confirm printer creation? (Y/N): Y
Set as default printer? (Y/N): Y
Share this printer on the network? (Y/N): Y
Share name [SharedPrinter]: HP_Shared
Perform a test print? (Y/N): Y

⚙️ Configuration

Default values (printer name, IP, etc.) can be modified directly at the beginning of the script file to fit your environment.

About

Script PowerShell interactif conçu pour simplifier la création, la configuration et la gestion d'imprimantes locales sous Windows. Il offre une interface utilisateur conviviale avec des valeurs par défaut personnalisables pour automatiser le déploiement d'imprimantes.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors