Greetings to all!
Faced the task of making a variable in the popup window of the prompt box.
Here is the code:
<!DOCTYPE html> <html> <body> <h2>PS Prompt test</h2> <button onclick="Function()" id="test">send value</button> <p id="demo"></p> <script> function Function() { var txt; var text = prompt("Please enter text:", "example text"); if (text == null || text == "") { txt = "User cancelled the prompt."; } else { txt = "Your text is: " + text; } document.getElementById("demo").innerHTML = txt; } </script> </body> </html> I could only get to open it:
$ie = New-Object -ComObject InternetExplorer.Application; $loginpage = "https://127.0.0.1/1/" $ie.Navigate2($loginpage) $ie.Visible = $true; While ($ie.Busy) {Start-Sleep -Milliseconds 100} $ie.document.IHTMLDocument3_getElementByID("test").click() Next you need to enter any text in the pop-up window and click on the button 
If you can help solve this problem. Thank.
$ie.document.IHTMLDocument3_getElementByID("ваш ID, куда нужно текст вставить").value = txt;- Senior Pomidor