I just tried the original script with the modified add code line on a remote pc and while it did produce errors on the screen, it also produced results. You might remove some of you error checking and see what it gets you.

 Code:
The operation completed successfully.
Invalid number of parameters.
Invalid number of parameters.
-2147352562
[317]
-2147352562
There was an error getting the update collection Invalid number of parameters.
Title:                   Update for Windows Server 2003 (KB2641690)
Description:             Install this update to resolve an issue which requires
an update to the certificate revocation list on Windows systems and to keep your
 systems certificate list up to date. After you install this update, you may hav
e to restart your system.
Update application date: 11/17/2011 3:39:47 PM
Operation type:         Installation
Operation result:       The operation completed successfully.
Update ID:              9b1eb814-0ee1-49c1-98cc-6f893ba8ba0f
------------------------------------------------------------?

Title:                   Windows Malicious Software Removal Tool - November 2011
 (KB890830)
Description:             After the download, this tool runs one time to check yo
ur computer for infection by specific, prevalent malicious software (including B
laster, Sasser, and Mydoom) and helps remove any infection that is found. If an
infection is found, the tool will display a status report the next time that you
 start your computer. A new version of the tool will be offered every month. If
you want to manually run the tool on your computer, you can download a copy from
 the Microsoft Download Center, or you can run an online version from microsoft.
com. This tool is not a replacement for an antivirus product. To help protect yo
ur computer, you should use an antivirus product.
Update application date: 11/12/2011 6:56:29 PM
Operation type:         Installation
Operation result:       The operation completed successfully.
Update ID:              846185a2-40da-4909-91d1-064ae329a0ff