A collection of powershell scripts to help manage Windows
This repository has been archived on 2024-09-06. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
2021-01-31 22:36:14 +01:00
lib First commit 2021-01-31 22:36:14 +01:00
Add-Printer.ps1 First commit 2021-01-31 22:36:14 +01:00
LICENCE.md First commit 2021-01-31 22:36:14 +01:00
README.md First commit 2021-01-31 22:36:14 +01:00

Win-ConfigScripts

A collection of Powershell scripts to help manage Windows. For now there is only a script to help installing network printer.

Add-NetworkPrinter.ps1 : Add a network printer

usage

Add-NetworkPrinter.ps1 -Inf <inf_file> -Ip <ip_adress> -DriverName <drivername> -Name <printer-name> -PortPrefix <port_name_prefix>
  • -Inf: path to inf file.
  • -Ip: IP adress of printer.
  • -DriverName: name of the driver.
  • -Name : name given to the printer in configuration panel, if empty then will be DriverName.
  • -PortPrefix: prefix fot the printer port name, the prefix will be added to the IP adress. Default is salt_.

Example

.\Add-NetworkPrinter.ps1 -Inf \\server\printer\driver12.inf -Ip 192.168.9.212 -DriverName "Konica-Minolta C224e' -Name "Konica second floor"

Add a printer named "Konica second floor " with driver "Konica-Minolta c224e" located in \\server\printer\driver12.inf.

Module

This script use a powershel module located in lib\ManagePrinter.psd1. This module contains several commandlets to help manage printers : Add-NetworkPrinterPort,Install-PrinterDriver, Add-NetworkPrinter

Licence

All this work is licenced under the MIT Expat Licence.