Export Windows Update list

If you want to export a list of updates installed on a Windows 2008 server, there is a built in tool to do this.
Use the WMIs Command-line interface (WMIC) to export this list.

On the command line:

wmic qfe get /format:csv > C:\updates.csv

You can use these other format options:

CSV | HFORM | HTABLE | LIST | MOF | RAWXML

HFORM/HTABLE are HTML
LIST is Tab Delimited
RAWXML is XML

Enable Disk Cleanup Utility in Windows 2008 R2

To cleanup your disks from old files, service packs and tempory internet files Windows 7 has a tool called Disk Cleanup.

By default, this tool is not installed on Windows 2008 R2.
There are two ways to enable this:

  1. Install the “Desktop Experience” feature.
    This will install several Windows 7 features on your Windows 2008 R2 server such as Windows Media Player, Photo Management and the Disk Cleanup Utility.
    This is of course something you do not want installed on your server. Also, the server requires a reboot after installing the feature.
     
  2. Copy the files from the WINSXS directory.
    An easier way of enabling this the cleanup utility is to copy the files from the winsxs directory.
    You need two files: cleanmgr.exe and cleanmgr.exe.muiCopy cleanmgr.exe from  C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.1.7600.16385_none_c9392808773cd7da\cleanmgr.exe to %systemroot%\System32
    Copy cleanmgr.exe.mui from C:\Windows\winsxs\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.1.7600.16385_en-us_b9cb6194b257cc63\cleanmgr.exe.mui to %systemroot%\System32\en-US

There you go!

List all Windows updates in HTML or TXT format

wmic qfe list brief /format:htable > "c:\hotfix.html"

This produces a HTML file named “hotfix.html” that gets placed in the root of your C: drive.
If you would rather have a text file, the command would be:

wmic qfe list brief /format:texttablewsys > "%USERPROFILE%\hotfix.txt"

Task Scheduler Error and Success Codes

SCHED_S_TASK_READY
0x00041300
The task is ready to run at its next scheduled time.
SCHED_S_TASK_RUNNING
0x00041301
The task is currently running.
SCHED_S_TASK_DISABLED
0x00041302
The task will not run at the scheduled times because it has been disabled.
SCHED_S_TASK_HAS_NOT_RUN
0x00041303
The task has not yet run.
SCHED_S_TASK_NO_MORE_RUNS
0x00041304
There are no more runs scheduled for this task.
SCHED_S_TASK_NOT_SCHEDULED
0x00041305
One or more of the properties that are needed to run this task on a schedule have not been set.
SCHED_S_TASK_TERMINATED
0x00041306
The last run of the task was terminated by the user.
SCHED_S_TASK_NO_VALID_TRIGGERS
0x00041307
Either the task has no triggers or the existing triggers are disabled or not set.
SCHED_S_EVENT_TRIGGER
0x00041308
Event triggers do not have set run times.
SCHED_E_TRIGGER_NOT_FOUND
0x80041309
A task’s trigger is not found.
SCHED_E_TASK_NOT_READY
0x8004130AContinue reading

Scheduled Task fails with error code 2147942667

A scheduled task in Windows Server 2008 fails to start.

The task history displays two errors:

Event 103: Task Scheduler failed to start instance “{…}” of “…”  task for user “…”.
Additional Data: Error Value: 2147942667.

Event 203: Task Scheduler failed to launch action “…” in instance “…” of task “…”.
Additional Data: Error Value: 2147942667.

Error code 2147942667 indicates that the directory name is invalid. In most cases, this is caused by placing quotes around the “Start In” directory.
Resolution

Remove the surrounding quotes from the “Start In” path.
The path of the program to launch must be surrounded by quotes if it contains spaces; the “Start In” path must not be surrounded by quotes.

Applies To:
  • Windows 7
  • Windows Server 2008
  • Windows Server 2008 R2
  • Windows Vista