Skip to content

Universal Print Powershell Module

drawing

👋 Introduction

The UniversalPrintManagement PowerShell module is designed for managing and administrating Universal Print resources from the command line.

INFO

The code samples on the official Microsoft Learn Page do not work at the moment, so I corrected them and you can find them together with the standard commands below or as scipts in my Github.

💿 Installation

Microsoft provides a special Poweshell Module to manage Universal Print.

powershell
Install-Module UniversalPrintManagement

🔛 Microsoft Graph Connection

Connect to the Microsoft Graph with this special Universal Print Powershell Module command.

powershell
Connect-UPService

🛃 Powershell Module Commands

The following command retrieves a list of all available cmdlets in the Universal Print Management module.

powershell
Get-Command -Module UniversalPrintManagement

Below you find the available commands, along with their descriptions.

Sign-in

CmdletDescription
Connect-UPServiceConnects with an authenticated account to use for Universal Print cmdlet requests.

Printers

CmdletDescription
Get-UPPrinterUse this cmdlet to get information about a single or list of printers.
Remove-UPPrinterUse this cmdlet to unregister printers.

Printer Properties

CmdletDescription
Set-UPPrinterPropertyUse this cmdlet to update mutable properties of a printer.

Printer Shares

CmdletDescription
New-UPPrinterShareUse this cmdlet to share a printer.
Get-UPPrinterShareUse this cmdlet to get information about a single or list of shared printers.
Remove-UPPrinterShareUse this cmdlet to unshare printers that have been shared earlier.
Set-UPPrinterShareUse this cmdlet to update a printer share to swap a registered printer due for maintenance with a working one.

User Permissions

CmdletDescription
Grant-UPAccessUse this cmdlet to grant print access to a user or group or all users in the organization.
Revoke-UPAccessUse this cmdlet to revoke print access from a user or group or all users in the organization.
Get-UPAllowedMemberUse this cmdlet to get information about users and groups that have print access to a specific printer.

Connectors

CmdletDescription
Get-UPConnectorUse this cmdlet to get information about a single or list of connectors.
Remove-UPConnectorUse this cmdlet to unregister connectors.

Connector Properties

CmdletDescription
Set-UPConnectorPropertyUse this cmdlet to update mutable properties of a connector.
CmdletDescription
Get-UPPrintJobUse this cmdlet to get information about print jobs that were sent to a printer.
CmdletDescription
Get-UPUsageReportUse this cmdlet to get different types of print usage reports.

📜 Use Case Samples

Batch share all printers

powershell
Import-Module UniversalPrintManagement
connect-uPService

$printers = get-upprinter
foreach($printer in $printers.results){
    new-upprintershare -PrinterId $printer.id -ShareName $printer.displayname -confirm
}

Batch grant all users access to shared printers

powershell
Import-Module UniversalPrintManagement
connect-uPService
 
$Shares = Get-UPPrinterShare
foreach($share in $shares.results){Grant-UPAccess -ShareID $share.id -AllUsersAccess}

Remove all Shares

powershell
Import-Module UniversalPrintManagement
connect-uPService

$shares = get-upPrinterShare
foreach($share in $shares.results){remove-upprintershare -ShareID $share.id -confirm}

Last updated: