Hi. I need a little help here. We have a few old print servers and they want "keep printed jobs" turned on on all printers. The print servers are Server 2008. So printer management module is not available to me.
However i can not figure out how to change this property. Everything i have tried has failed. I found VBScripts that can do this but i am determined to find the powershell way to do this.
Also odd is is see "keepprintedjobs" as a property. But if put the above get-wmiobject into a variable (lets say $A)....and i then try to run
$A.keepprintedjobs it yells that it is not a property that it can find. Can someone point me in the right direction.
A bit more of an explanation. Your call of Get-WmiObject most likely returned an array of printer objects instead of just one. You'll need to loop over the array for example with Foreach-Object and update each object individually. However, just updating KeepPrintedJobs to True of each object won't change the printer queue configuration that is why you need to write it back to the printer server service with the Put() method.