A lightweight, GUI-based PowerShell application designed to simplify the installation of network shared printers for end-users via Microsoft Intune or manual deployment.
- Dynamic Printer Listing: Automatically fetches and displays all shared printers from a specified print server.
- Visual Feedback: Checks currently installed printers on the local machine and marks them Green (and disables the button) to prevent duplicate installations.
- Reliable Installation: Uses
printui.dllviaStart-Process -Waitto ensure the installation process completes before notifying the user. - Connectivity Guard: Performs a pre-launch check for the primary server and a fallback IP; if neither is reachable, it alerts the user and exits.
- Stealth Launch: Automatically hides the PowerShell console window to provide a native app feel.
The package consists of three main PowerShell scripts:
NetPrinterDeployer.ps1: The core application containing the GUI logic, connectivity checks, and printer installation commands.Installer.ps1: Handles the deployment by creating a local support directory (C:\\support\\NetPritnerDeployer), copying the main script, and creating a Start Menu Shortcut for easy user access.Uninstaller.ps1: Cleans up the environment by removing the script and its parent directory if empty.
Before deployment, update the following variables in NetPrinterDeployer.ps1 to match your environment:
$PrimaryServer = "YourPrintServerName"
$FallbackIP = "10.x.x.x"
$PrintServerPath = "\\\\YourPrintServerName"This section provides a step-by-step guide on how to package and deploy the NetPrinter Deployer as a Win32 application using Microsoft Intune.
- Create a dedicated folder (e.g.,
C:\IntuneSource\NetPrinter). - Place the following three files into this folder:
NetPrinterDeployer.ps1Installer.ps1Uninstaller.ps1
Use the Microsoft Win32 Content Prep Tool to wrap the folder:
- Source folder:
C:\IntuneSource\NetPrinter - Setup file:
Installer.ps1 - Output folder: Your desired destination for the
.intunewinfile.
Log in to the Microsoft Intune Admin Center and navigate to Apps > Windows > Add. Select Windows app (Win32).
- Name: Network Printer Installer
- Description: GUI tool to install shared printers from the corporate print server.
- Publisher: Your Organization
- Install command:
powershell.exe -ExecutionPolicy Bypass -File "Installer.ps1" - Uninstall command:
powershell.exe -ExecutionPolicy Bypass -File "Uninstaller.ps1" - Install behavior: User > Note: This is critical. Network printers are mapped to the user profile. If set to 'System', the script will not map printers for the logged-in user.
- Operating system architecture: x64
- Minimum operating system: Windows 10 1607
Configure a manual detection rule to verify the existence of the Start Menu shortcut:
- Rule type: File
- Path:
%AppData%\Microsoft\Windows\Start Menu\Programs - File or folder:
NetPrinterDeployer.lnk - Detection method: File or folder exists
- Associated with a 32-bit app on 64-bit clients: No
Assign the app to your target User Groups.
- For the best experience, set the assignment to Available. This allows users to "Install" it from the Company Portal once, which places the permanent shortcut in their Start Menu for future use.
- The user opens the Company Portal.
- They click Install on the "Network Printer Installer".
- Once the status shows "Installed", they can launch the tool directly from their Start Menu at any time, even if the Company Portal button is greyed out.