external help file | Module Name | online version | schema |
---|---|---|---|
ComputerManagement-help.xml |
ComputerManagement |
2.0.0 |
Get a log of all printing from a given server.
Get-PrinterLog [[-LogName] <Object>] [-ComputerName] <Object> [<CommonParameters>]
This function will return a log of all the printing that has occurred on a given print server.
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.
Get-PrinterLogs -ComputerName ps |Export-Csv -Path .\PrintLogs.csv
This is the syntax that I would see being used the most.
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
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
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
The following log will need to be enabled before logs can be generated by the server: "Microsoft-Windows-PrintService/Operational"