I am having powershell script ex1.ps1 which takes user inputs and ex1.ps1 have commands to open new powershell to execute APPLICATION.exe file (Start-Process -FilePath "$PSHOMEpowershell.exe" -ArgumentList "-command C:APPLICATION1.exe).Iwant to execute ex1.ps1 on remote host,I am trying to call ex1.ps1 using Ansibe-playbook as
- name: Run basic PowerShell script
powershell.exe -ExecutionPolicy ByPass -File C:/Users/ex1.ps1
It is executing fine but in remote host there is no powershell prompt is open to get the inputs.
can someone help me out.
Source: Windows Questions