theUser
theUser

Reputation: 1396

Automating a powershell command that prompts for user input?

I execute the command

Enable-PSRemoting

and sometimes it prompts

Do you want to continue?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

How do I automate the answer to 'A' when it prompts for this ?

Upvotes: 0

Views: 713

Answers (1)

Raf
Raf

Reputation: 10117

Enable-PSRemoting -Confirm:$false

Upvotes: 1

Related Questions