hi
i want to run a command on multiple servers using Invoke-Command
the problems is that if a command need an answer like YES or YES TO ALL
i must click on it for it to finish
is there any way to automate this ?
hi
i want to run a command on multiple servers using Invoke-Command
the problems is that if a command need an answer like YES or YES TO ALL
i must click on it for it to finish
is there any way to automate this ?
So what are you invoking? Is it creating a pop-up gui or is the confirmation printed to console? Can you add silent parameter or confirm:$false?
Ideally, CmdLets ask for confirmation if they are critical, and if you know the impact then check to see if it supports -Force parameter, with -Force parameter it will not ask for the confirmation.
Which command is it? Sometimes you can pipe ‘y’ or ‘yes’ to it, or it has a ‘/y’ option.