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

[玩转系统] 使用 PowerShell 删除打印作业

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

使用 PowerShell 删除打印作业


要在 Windows 中删除指定打印机上的打印作业,请在 PowerShell 中使用 Remove-PrintJob 命令。 Remove-PrintJob 命令使用 PrinterName 和作业 ID 参数来远程指定打印机上的打印作业。

以下是删除指定打印机上的打印作业的 PowerShell 命令。

Remove-PrintJob -PrinterName "INCORP-EU-01\RICHO1" -ID 42

在上述 PowerShell 脚本中,Remove-PrintJob 命令使用 PrinterName 参数指定打印机和 ID 作为作业 ID,并删除指定打印机上的作业。

上述 PowerShell 脚本的输出从名为“INCORP-EU-01\RICHO1”的打印机中删除 ID 为 42 的打印作业。

您可以使用 PowerShell 中的 Get-PrintJob 命令获取指定打印机中的打印作业列表。

结论

希望上面关于如何使用PowerShell Remove-PrintJob命令在Windows系统上删除打印作业的文章对您有所帮助。

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

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

取消回复欢迎 发表评论:

关灯