PowerShell Logo Small

Out-Printer



This is the built-in help made by Microsoft for the command 'Out-Printer', in PowerShell version 2 - as retrieved from Windows version 'Microsoft® Windows Vista™ Ultimate ' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Sends output to a printer.

SYNTAX


Out-Printer [[-Name] <string>] [-InputObject <psobject>] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Out-Printer cmdlet sends output to the default printer or to an alternate printer, if one is specified.



<

RELATED LINKS

Online version: http://go.microsoft.com/fwlink/?LinkID=113367
Out-Host
Out-Null
Out-String
Out-File
Out-Default

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

C:\PS>get-content $pshome\about_signing.help.txt | Out-Printer



Description
-----------
This command prints the content of the about_Signing Help topic to the default printer. This example shows you how to print a file, even though O
ut-Printer does not have a Path parameter.

The command uses the Get-Content cmdlet to get the contents of the Help topic. The path includes $pshome, a built-in variable that stores the ins
tallation directory for Windows PowerShell. A pipeline operator (|) passes the results to Out-Printer, which sends it to the default printer.








-------------------------- EXAMPLE 2 --------------------------

C:\PS>"Hello, World" | out-printer -name "\\Server01\Prt-6B Color"



Description
-----------
This command prints "Hello, World" to the "Prt-6B Color" printer on Server01. This command uses the Name parameter to specify the alternate print
er. Because the parameter name is optional, you can omit it.








-------------------------- EXAMPLE 3 --------------------------

C:\PS>$h = get-help -full get-wmiobject

C:\PS> out-printer -inputobject $h



Description
-----------
These commands print the full version of the Help topic for Get-WmiObject. The first command uses the Get-Help cmdlet to get the full version of
the Help topic for Get-WmiObject and stores it in the $h variable. The second command sends the content to the default printer. It uses the Input
Object parameter to pass the value of the $h variable to Out-Printer.