Stop confirmation prompt
I have a script that stops mail forwarding for a list of users input from a text file; that works fine. The script also deletes the mail contact used to forward the mail; this works but stops at each one for confirmation. We are stopping mail forwarding for hundreds of users each week as part of a merger and stopping at each one for a prompt is a killer. I do not have the -confirm switch in the command. The documentation for the Remove-mailcontact command indicates you need to add that switch if you want confirmation, but in reality it seems to be the default and I can't turn it off. thanks in advace
October 11th, 2008 2:15am

In spite of what the documentation says about the -confirm switch you can pass a value to it. By adding this to the end of the remove-mailcontact command I was able to get the script to run to completion without asking for a confirmation whenever it deleted a mail contact. -confirmFalse.
Free Windows Admin Tool Kit Click here and download it now
October 11th, 2008 2:28am

For some reason the forum converts a colondollarsign into a sad face. the correct switch is supposed to be: -confirmcolondollarsignFalse
October 11th, 2008 2:41am

Thanks for yours sharing here.
Free Windows Admin Tool Kit Click here and download it now
October 13th, 2008 12:05pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics