Exchange 2007 Export-Mailbox problem

I am running the following command to dump all mailboxes to pst

Get-Mailbox | Export-Mailbox -PSTFolderPath e:\current

The problem i have is it prompts to push "A" for all, is there a way to pass this is a scipt so i can automate it.

I have tried adding /A and |A  but neither works.
Who is Participating?
GundogTrainerConnect With a Mentor Commented:
Not at a powershell console to test but I think you can set the system variable to not nprompt by:
$ConfirmPreference = 'None'

nhidalgoAuthor Commented:
That did the trick, thanks very much.
Just wanted to add that the default is 'High' and you may want to set it back to at the end of your script to stop you doing something "bad" accidentally.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.