調べてもあまり出てこなかったので、備忘録として

Set Locator = WScript.CreateObject(“WbemScripting.SWbemLocator”)
Set Service = Locator.ConnectServer
Set Jobs = Service.ExecQuery(“Select * From Win32_PrintJob”)

For Each oJob In Jobs
set oJobs = Service.Get(“Win32_PrintJob.Name='” & oJob.Name & “‘”)
oJobs.Delete_()
Next

広告