• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Exception calling "CreateInstance" with "2" argument(s): for Microsoft.Update.UpdateColl

R
#1
I have been fighthing with this error a good amount of time. I have
verified that the wuapi.dll is registered for the CLSID as found in the
registry. I cant seem to make this com object work locally or remotely on
any desktop or servers. Anyone with any ideas or experience with the
Microsoft.Update.UpdateColl? Thanks.

$Server = "server001"
$type =
[System.Type]::GetTypeFromProgID("Microsoft.Update.UpdateColl",$Server)
$objUpdatesToDownload = [system.Activator]::CreateInstance($type)

Exception calling "CreateInstance" with "2" argument(s): "Retrieving
the COM class factory for remote component with CLSID {13639463-00DB-
4646-803D-528026140D88} from machine server001 failed due to the fol
lowing error: 80040154."
At line:1 char:59
+ $objUpdatesToDownload = [system.Activator]::CreateInstance <<<< ($t
ype)
 

My Computer

S

Shay Levy [MVP]

#2
"Incidentally, the Windows Update object model is a mixed-bag: some of the
objects can be created on - and thus used against - remote computers while
others can’t."

http://www.microsoft.com/technet/scriptcenter/resources/qanda/aug05/hey0824.mspx



---
Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar: http://tinyurl.com/PSToolbar



R> I have been fighthing with this error a good amount of time. I have
R> verified that the wuapi.dll is registered for the CLSID as found in
R> the registry. I cant seem to make this com object work locally or
R> remotely on any desktop or servers. Anyone with any ideas or
R> experience with the Microsoft.Update.UpdateColl? Thanks.
R>
R> $Server = "server001"
R> $type =
R> [System.Type]::GetTypeFromProgID("Microsoft.Update.UpdateColl",$Serve
R> r)
R> $objUpdatesToDownload = [system.Activator]::CreateInstance($type)
R> Exception calling "CreateInstance" with "2" argument(s): "Retrieving
R> the COM class factory for remote component with CLSID {13639463-00DB-
R> 4646-803D-528026140D88} from machine server001 failed due to the fol
R> lowing error: 80040154."
R> At line:1 char:59
R> + $objUpdatesToDownload = [system.Activator]::CreateInstance <<<< ($t
R> ype)
 

My Computer

M

Marco Shaw [MVP]

#3
Re: Exception calling "CreateInstance" with "2" argument(s): forMicrosoft.Update.UpdateColl

Rich wrote:

> I just tried this using vbscript and it worked locally. So as you were
> saying it does look like Powershell has some issue with this specific
> COM object.
What does your VBScript code look like? Curious...
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)