Have looked into the windows update script in MDT? May not provide you with the goal but you can see sample code that could assist.
Cesar A On Jun 22, 2015 8:59 AM, "Robert Spinelli" <[email protected]> wrote: > The helpdesk currently use the PowerShell script below that we’ve modified > to kick off patching remotely on machines outside of our defined patching > maintenance windows > > · > https://gallery.technet.microsoft.com/scriptcenter/Install-All-Missing-8ffbd525 > > > > The issue we have is there are still some Windows XP / Windows 2003 boxes > still floating around (political thing not technical) that don’t have PSH > on them and there is no plan to put PSH on them. What we’ve been trying to > do is develop a .vbs script that will do the same process the PSH script > above does, but can’t get it to work. > > > > We’re hitting a roadblock with the InstallUpdates call to > CCM_SoftwareUpdatesManager passing arguments for the update. > > https://msdn.microsoft.com/en-us/library/jj155394.aspx > > > > It is expecting a collection of type CCMUpdates, I am unable to define a > collection in VBS. I have tried declaring this as an array and that did > not help. I keep getting a type mismatch error on the function call. > > > > Uint32 InstallUpdates( > > [IN] CCM_SoftwareUpdate_CCMUpdates[] > > ) ; > > > > Anyone have any idea why this isn’t working. > > > > The reason we really like the PSH script is because the updates will run > even its outside of the MW. All the other scripts out there we’ve tried > respected the MW and wouldn’t run the patches. The PSH mimics just like a > user going into Software Center and running the patches (which overrides > MW). > > > > Thanks > > > > Rob > >
