I started combining this PowerShell Script, I hope that we will replace some of the tasks that are currently performed manually
I use
get-Date.AddDays()
function
I use ISE to build the Script, and when testing, I get the output if I select the "starttime" property, but this seems like a trick because all the values ββare zero, d would like to use the "timeubmitted" property, but the date seems to be output in odd, which, in my opinion, is not read correctly, because my requests with "timeubmitted" always go blank.
it is displayed in this format if you are performing an open request
20120416030836.778000-420
that's what i still have.
ignore | 'format-table' that i just see if i get the desired result
Set-ExecutionPolicy RemoteSigned -Force
$d = Get-Date
$old = $d.AddDays(-4)
Get-WmiObject -class win32_printjob -namespace "root\CIMV2" | where-object {$_.timesubmitted -lt
"$old"} | ft caption,document,jobid,jobstatus,owner,timesubmitted