Skip to content

Latest commit

 

History

History
92 lines (69 loc) · 2.02 KB

Get-PrinterLog.md

File metadata and controls

92 lines (69 loc) · 2.02 KB
external help file Module Name online version schema
ComputerManagement-help.xml
ComputerManagement
2.0.0

Get-PrinterLog

SYNOPSIS

Get a log of all printing from a given server.

SYNTAX

Get-PrinterLog [[-LogName] <Object>] [-ComputerName] <Object> [<CommonParameters>]

DESCRIPTION

This function will return a log of all the printing that has occurred on a given print server.

EXAMPLES

EXAMPLE 1

Get-PrinterLogs -ComputerName ps

Size     : 96060
Time     : 8/16/2011 5:01:09 PM
User     : MyAccount
Job      : 62
Client   : \\\\10.133.5.143
Port     : Desktop-PC01.company.com
Printer  : HP-Laser
Pages    : 1
Document : Microsoft Office Outlook - Memo Style

This example shows the basic usage of the command.

EXAMPLE 2

Get-PrinterLogs -ComputerName ps |Export-Csv -Path .\PrintLogs.csv

This is the syntax that I would see being used the most.

PARAMETERS

-ComputerName

The name of your print server.

Type: System.Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LogName

The default log for printing on Windows Server 2008 R2 is specified.

Type: System.Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: Microsoft-Windows-PrintService/Operational
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

The following log will need to be enabled before logs can be generated by the server: "Microsoft-Windows-PrintService/Operational"

RELATED LINKS