How to make drush un-install modules without confirmation I want to create a drush command that reinstall some modules.
I've done something like this:

  $modules_to_uninstall = array("my_module1", "my_module2", "my_module3", "my_module4", "my_module5");
  foreach($modules_to_uninstall as $name){
    $args = array_merge(array('pm-uninstall') ,array($name));
    call_user_func_array('drush_invoke', $args);
  }


but, when I run the command in drush, it always asks me if I want to uninstall that module.

The following modules will be uninstalled: my_module1
Do you really want to continue? (y/n): y
my_module1 was successfully uninstalled.                                                                                                                                                                     [ok]
The following modules will be uninstalled: my_module2
Do you really want to continue? (y/n): y
my_module2 was successfully uninstalled.


[ok]
    The following modules will be uninstalled: my_module2
    Do you really want to continue? (y/n): y
    my_module3 was successfully uninstalled. 
.... 

$modules_to_uninstall = array("-y my_module1", "my_module2", "my_module3", "my_module4", "my_module5");
  foreach($modules_to_uninstall as $name){
    $args = array_merge(array('pm-uninstall') ,array($name));
    call_user_func_array('drush_invoke', $args);
  }


I've try those but it's useless.

Some suggestion?
Drush has a -y option, that accepts all questions with a yes. Use that.