Loading
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-SpWebapplicationCan anyone help me with the logic to open all the web apps in the browser?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Bhushan GawaleRank #299 · 8.4K reputationPosted Mar 19, 2015, 1:14 AM EDT
Aravinda Rao3 reputationPosted Mar 19, 2015, 1:28 AM EDT
Thanks for a quick response.
The URL you mentioned has $oIE.navigate2("About:blank") which is directing to navigate to the "About:blank" page and it works fine because you are specifying the URL to be directed to.
I am looking for a script which should get the URLs from Get-SPWebApplication and and then open all of them in tabs at a time.
My script gives all the URLs in the output however it opens only 1 URL in the browser. I need to know what logic I should write here under for each loop so that it reads all the urls and opens in browser.
Hope I made it clear
$webApps = Get-SpWebapplication
foreach($webapp in $WebApps){
$URL = $webapp.URL
}
Karthik Muthu KaruppanRank #671 · 3.6K reputationPosted Apr 14, 2015, 1:27 PM EDT
I could see that you have missed the looping. For this reason only the last web app in the list opens in IE,
$webApps = Get-SpWebapplication
foreach($webapp in $WebApps){
$URL = $webapp.URL
$ie = New-Object -ComObject InternetExplorer.Application
$ie.Navigate($URL)
}
The above piece of code must open all your sites in new browser.