I am a beginner in powershell and new to this forum. I am working on a powershell to script to open IE window with multiple tabs. Here is what the requirement is,
I am keeping the request number (PPM requests) in a txt file, and trying to execute ppm url adding the PPM number at the end of it. i was hoping that one IE windows would open with multiple tabs having different PPMc urls but it is not working as expected.
$path = read-host 'Enter the path of ppm list file'
$ie = new-object -ComObject InternetExplorer.Application
$ppms = gc "$path\list.txt"
foreach($ppm in $ppms)
{
$ie.Navigate2("http://ppmcentral.fmr.com/itg/web/knta/crt/RequestDetail.jsp?REQUEST_ID=$ppm",0x1000)
}
two tabs opens up but after that it thows this error message,
Exception calling "Navigate2" with "2" argument(s): "Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"
At line:6 char:16
+ $ie.Navigate2 <<<< ("http://ppmcentral.fmr.com/itg/web/knta/crt/RequestDetail.jsp?REQUEST_ID=$ppm",0x1000)
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ComMethodTargetInvocation