# IE com object not created

**URL:** <https://forums.powershell.org/t/ie-com-object-not-created/6279>\
**Category:** PowerShell Help\
**Created:** [April 21, 2016, 7:31pm UTC](https://forums.powershell.org/t/ie-com-object-not-created/6279 "2016-04-21T19:31:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![utkarsh-upadhyay](https://avatars.discourse-cdn.com/v4/letter/u/9de0a6/32.png) [@utkarsh-upadhyay](https://forums.powershell.org/u/utkarsh-upadhyay)\
**Post date:** [April 21, 2016, 7:31pm UTC](https://forums.powershell.org/t/ie-com-object-not-created/6279/1 "2016-04-21T19:31:43Z")

</div>

We have PowerShell 2.0 installed in our domain. We have automated opening of an intranet portal by providing PowerShell script.

However sometimes script is not able to create IE COM object. Its throwing below error:

New-Object : Creating an instance of the COM component with CLSID {0002DF01-000  
0-0000-C000-000000000046} from the IClassFactory failed due to the following er  
ror: 800704a6.  
At

- $ie = new-object \<\<\<\< -com "InternetExplorer.Application"
  - CategoryInfo : ResourceUnavailable: (🙂 [New-Object], COMExcept  
ion
  - FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Comman  
ds.NewObjectCommand

Please suggest.

---

<div class="post-metadata">

**Author:** ![rdtechie](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rdtechie/32/273_2.png) [@rdtechie](https://forums.powershell.org/u/rdtechie)\
**Post date:** [April 21, 2016, 7:36pm UTC](https://forums.powershell.org/t/ie-com-object-not-created/6279/2 "2016-04-21T19:36:55Z")

</div>

Can you show the script? Look at the error message: ResourceUnavailable. Looks like you don’t have enough resources on the system you’re running this script. Are you using this in a loop or something? Try it outside the loop. I’m only guessing here without knowing your script.

---

<div class="post-metadata">

**Author:** ![utkarsh-upadhyay](https://avatars.discourse-cdn.com/v4/letter/u/9de0a6/32.png) [@utkarsh-upadhyay](https://forums.powershell.org/u/utkarsh-upadhyay)\
**Post date:** [April 21, 2016, 7:53pm UTC](https://forums.powershell.org/t/ie-com-object-not-created/6279/3 "2016-04-21T19:53:02Z")

</div>

Below is the script for your reference -

Function maxIE  
{  
param($ie)  
$asm = [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”)

```
$screen = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds
$ie.Width = $screen.width
$ie.Height =$screen.height
$ie.Top = 0
$ie.Left = 0

```

}

cls  
$ie = new-object -com “InternetExplorer.Application”  
$ie.visible = $true  
$ie.menubar = 0  
$ie.ToolBar = 0  
$ie.statusbar = 0  
maxIE $ie  
while ($ie.busy) {sleep -milliseconds 50}  
$ie.navigate(“{Intranet portal URL}”)

Please suggest. Thanks

---

<div class="post-metadata">

**Author:** ![martinlhotsky](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@martinlhotsky](https://forums.powershell.org/u/martinlhotsky)\
**Post date:** [April 21, 2016, 8:29pm UTC](https://forums.powershell.org/t/ie-com-object-not-created/6279/4 "2016-04-21T20:29:25Z")

</div>

Per links below this behavior is observed when computer needs reboot

[http://serverfault.com/questions/179156/ie8-script-error-800704a6](http://serverfault.com/questions/179156/ie8-script-error-800704a6)  
[http://stackoverflow.com/questions/5542666/open-browser-in-powershell-just-stopped-working](http://stackoverflow.com/questions/5542666/open-browser-in-powershell-just-stopped-working)

---

<div class="post-metadata">

**Author:** ![rdtechie](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/rdtechie/32/273_2.png) [@rdtechie](https://forums.powershell.org/u/rdtechie)\
**Post date:** [April 22, 2016, 2:05am UTC](https://forums.powershell.org/t/ie-com-object-not-created/6279/5 "2016-04-22T02:05:05Z")

</div>

As I said, it looks like you’re running out of resources on your system. Try to free up resources by unloading the object. Look at this article on how to unload the com object: [https://technet.microsoft.com/en-us/library/ff730962.aspx?f=255&amp;MSPPError=-2147217396](https://technet.microsoft.com/en-us/library/ff730962.aspx?f=255&amp;MSPPError=-2147217396)

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:41pm UTC](https://forums.powershell.org/t/ie-com-object-not-created/6279/6 "2024-05-16T20:41:34Z")

</div>

Closed on May 16, 2024, 8:41pm UTC


