Other Configuration Manager-related features and issues
Hello Microsoft Support Team,
I am trying to run the following PowerShell script to install an application:
PowerShell
powershell.exe -ExecutionPolicy Bypass -File "C:\Program Files (x86)\Install.ps1"
However, the script hangs and waits for manual input of Y (Yes) or N (No) at a confirmation prompt. I want to run the installation fully unattended, automatically answering “Yes” to all prompts.
I have tried the following approaches:
- Piping “Y” directly:
PowerShell
echo Y | powershell.exe -ExecutionPolicy Bypass -File "C:\Program Files (x86)\Install.ps1"
- Using Start-Process and feeding input from a file:
PowerShell
Create input.txt with "Y" in it
powershell.exe -ExecutionPolicy Bypass -Command "Start-Process 'powershell.exe' -ArgumentList '-ExecutionPolicy Bypass -File "C:\Program Files (x86)\Install.ps1"' -Wait -NoNewWindow -RedirectStandardInput 'C:\path\to\input.txt'"
Both methods are intended to bypass the manual confirmation step and allow the installation to complete unattended.
Could you please advise the correct way to run Install.ps1 without requiring user interaction for yes/no prompts?
Thank you,
Rida Islam