Universal Print PowerShell module
The UniversalPrintManagement PowerShell module is designed for managing and administrating Universal Print resources from the command line. Use this module when you want to build automated tools.
This article helps you get started with UniversalPrintManagement module and teaches the core concepts behind it.
Run the following command from a PowerShell session:
By default, the PowerShell gallery isn't configured as a trusted repository for PowerShellGet. The first time you use the PSGallery you will see the following prompt:
Untrusted repository You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the `Set-PSRepository` cmdlet. Are you sure you want to install the modules from 'PSGallery'? [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"):
Yes to All to continue with the installation.
For additional information about installing PSGallery modules in offline scenarios, refer to the PowerShell Gallery
Sign in to Universal Print
Sign in interactively with the
You'll get a sign-in dialog to provide a username and password for your Azure account or select one of the previously saved accounts.
The main purpose of this cmdlet is to allow non-interactive sign in for automated scripts. This can be done, for example, using
Connect-UPService -UserPrincipalName firstname.lastname@example.org -Password $variableHoldingSecureString syntax and retrieving the password from a secure storage.
Once signed in, use the available cmdlets in the module to access and manage printer resources.
UniversalPrintManagement cmdlets follow a standard naming convention for PowerShell,
VERB-NOUN. The verb describes the action (examples include
Revoke) and the noun describes the resource type (examples include
UPAccess). Nouns in UniversalPrintManagement always start with the prefix
Knowing the nouns and verbs help you find commands with the Get-Command cmdlet. For example, to find commands that use the
Get-Command -Verb Get -Module UniversalPrintManagement
To get cmdlet details with examples:
Get-Help Get-UPPrinter -Detailed
|Connect-UPService||Connects with an authenticated account to use for Universal Print cmdlet requests.|
|Get-UPPrinter||Use this cmdlet to get information about a single or list of printers.|
|Remove-UPPrinter||Use this cmdlet to unregister printers.|
|Set-UPPrinterProperty||Use this cmdlet to update mutable properties of a printer.|
|New-UPPrinterShare||Use this cmdlet to share a printer.|
|Get-UPPrinterShare||Use this cmdlet to get information about a single or list of shared printers.|
|Remove-UPPrinterShare||Use this cmdlet to unshare printers that have been shared earlier.|
|Set-UPPrinterShare||Use this cmdlet to update a printer share to swap a registered printer due for maintenance with a working one.|
|Grant-UPAccess||Use this cmdlet to grant print access to a user or group or all users in the organization.|
|Revoke-UPAccess||Use this cmdlet to revoke print access from a user or group or all users in the organization.|
|Get-UPAllowedMember||Use this cmdlet to get information about users and groups that have print access to a specific printer.|
|Get-UPConnector||Use this cmdlet to get information about a single or list of connectors.|
|Remove-UPConnector||Use this cmdlet to unregister connectors.|
|Set-UPConnectorProperty||Use this cmdlet to update mutable properties of a connector.|
|Get-UPPrintJob||Use this cmdlet to get information about print jobs that were sent to a printer.|
Print Job Reports
|Get-UPUsageReport||Use this cmdlet to get different types of print usage reports.|