Powershell: Viewing Printer Properties
-
On 70-410 there was a print out of the printer properites in powershell consisting of printer name, port type, status, etc. The question was between what times could you print. On the read out two spots noted time and said:
StartTime: 1000
UntilTime:60
The answer choice were: immediately print, never printer, print between 1-7:00, or 10:00-17:00.
Thoughts??? -
For whatever reason, Microsoft chose to store the StartTime and UntilTime in a non-standard time format. It is measured in minutes and stored using GMT (Zulu Time). That makes the values hard to read. For example, if I set my printer to be available from 8AM to 5PM, the output ofGet-Printer "HP LaserJect 4350 | fl would be something like this:
Name : HP LaserJet 4350 ComputerName : Type : Local ShareName : PortName : LPT1: DriverName : HP LaserJet 4350 PCL6 Class Driver Location : Comment : SeparatorPageFile : PrintProcessor : winprint Datatype : RAW Shared : False Published : False PermissionSDDL : RenderingMode : KeepPrintedJobs : False Priority : 1 DefaultJobPriority : 0 StartTime : 720 UntilTime : 1260 PrinterStatus : Normal JobCount : 0
Now let's break down those numbers:
720/60=12. I am in Eastern Daylight time right now which is GMT-4, so 12-4=8 which corresponds to 8AM
1260/60=21. 21-4=17. The 17th hour of the day is 5PM (1700).
So doubling back to your example, it is:
StartTime: 1000
UntilTime:60
Which translates to 10AM until 1AM GMT. None of the answers you listed really matches with that. So, either there was more information in the question or we need to adjust for a timezone. I guess there is a third option in that it could have been a bad question :)
Hope that helps,
Don Pezet
Host, ITProTV -
Thank You so such Don! I couldn't find that information and don't have a network printer to test on. I may have confused the time which would be 60-1000, etc. Thank You for the clarification!
-
I suppose I could edit the printer properties of "Microsoft XPS Document Writer" then run the commands for all things printer related. I should even be able to create printers without having any attached. Thanks again.