当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] 在 PowerShell 中获取打印作业

作者:精品下载站 日期:2024-12-14 17:31:00 浏览:13 分类:玩电脑

在 PowerShell 中获取打印作业


要获取指定打印机中的当前打印作业,请使用 PowerShell 中的 Get-PrinterJob cmdlet。 `Get-PrinterJob` 命令使用 PrinterName 参数从打印机检索打印作业列表。

以下是在 PowerShell 中获取打印作业的 PowerShell 命令。

Get-PrintJob -PrinterName "INCORP-EU-01\RICHO1"

在上面的 PowerShell 脚本中,Get-PrinterJob 命令检索名为“INCORP-EU-01\RICHO1”的打印机上的打印作业列表。

下面给出了上述用于获取打印作业列表的 PowerShell 脚本的输出。

[玩转系统] 在 PowerShell 中获取打印作业

Get-PrinterJob 命令检索指定打印机中的所有待处理作业,并显示 ID、ComputerName、PrinterName、DocumentName、SubmittedTime 和 JobStatus 列。

您可以使用 PowerShell 中的 Get-Printer 命令来获取计算机上安装的打印机列表。

结论

希望上面有关如何使用 Get-PrinterJob 命令在 PowerShell 中获取打印作业列表的文章对您有所帮助。

您可以在 ShellGeek 主页上找到有关 PowerShell Active Directory 命令和 PowerShell 基础知识的更多主题。

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯