Figure 8.1 shows an example of the output.
Figure 8.1
Use formatting to
make the output of
the WMIC command
easier to read.
TIP You can use the /Format switch with any WMIC GET verb output. In fact, you can create your
own formats using the instructions at http://technet2.microsoft.com/windowsserver/
en/library/5d434da3-666d-434a-b259-0f0da0cfaff11033.mspx. If you want to edit
an existing format, check out the instructions at http://technet2.microsoft.com/
windowsserver/en/library/f4612816-4131-4e6d-999a-bda8c9a373491033.mspx.
Creating a new job is an interesting task with WMIC because you have to know several bits of
information to do it. First, all of the input arguments are required, even if you don??™t need them for
the job. Consequently, you??™ll need to type something like WMIC JOB Call Create "C:\WINDOWS\
SYSTEM32\DEFRAG.EXE",0,16,FALSE,FALSE,"********180000.000000-420" and press Enter
to create a job that defragments the hard drive at 6 P.M. every Friday. The list of create arguments
includes:
? Command
? DaysOfMonth
? DaysOfWeek
? InteractWithDesktop
? RunRepeatedly
? StartTime
Several of these values are easy to obtain.
Pages:
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536