http://www.perlmonks.org?node_id=1025947
tarunmudgal4u has asked for the wisdom of the Perl Monks concerning the following question:

I'm running a script that invokes a powershell prompt and fires some commands. During this process, the powershell program triggers a browser window where a user needs to enter his credentials and press the login button. Once it's done, user sees the welcome screen and enter a verification button. Now, rest of the script runs.

I don't understand how to handle this browser window during the execution of this Perl script. The browser window that opens up doesn't display the url as well.

Below is the code that I'm running-

unlink "powershell.out" if (-e ".\powershell.out"); $input = "date"; $program = "powershell.exe -STA -ExecutionPolicy RemoteSigned -command + - >> powershell.out"; $pid = open(WRITEME, "| $program") or die "Couldn't fork: $!\n"; print WRITEME "date\n"; print WRITEME ". ./PowerShell/common/Get-SepmRmmWsAccessToken.ps1 -sym +-383925ff28c -port 8446\n"; print WRITEME "Get-SepmRmmWsAccessToken -HostName 10.211.34.102 -Port +8446 -ClientId 7cbce559-2eca-4ff8-806b-b2e511a239d0 -ClientSecret 729 +05a1c-2953-4607-bb9a-0e92060308b7"; close(WRITEME) or die "Couldn't close: $!\n"; waitpid($pid, 1);

Please let me know your valuable inputs.