Aravinda Rao

Aravinda Rao

  • NA
  • 3
  • 1.5k

Launch All Web Applications in browser using PowerShell

Mar 19 2015 4:57 AM

Hi Geeks,

I am working on a Script where I should be able to launch all the web applications in the browser to open in tabs.

I have worked out with the following script and was able to come upto an extent where I am able to launch the Internet Explorer.But ....only 1 web app opens up and throws an error message :

Exception calling "Navigate" with "1" argument(s): "The interface is unknown. (Exception from HRESULT: 0x800706B5)"

Below is my script

Add-PSSnapin Microsoft.sharepoint.powershell -ErrorAction SilentlyContinue

$webApps = Get-SpWebapplication

foreach($webapp in $WebApps){

$URL = $webapp.URL

}

$ie = New-Object -ComObject InternetExplorer.Application
$ie.Navigate($URL)

while ($ie.busy -eq $true) {
Start-Sleep -Milliseconds 600
}


$ie.Visible = $true

Can anyone help me with the logic to open all the web apps in the browser?


Answers (3)