• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 479
  • Last Modified:

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.
  • 2
1 Solution
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.

Join & Write a Comment

Featured Post

Free tool for managing users' photos in Office 365

Easily upload multiple users’ photos to Office 365. Manage them with an intuitive GUI and use handy built-in cropping and resizing options. Link photos with users based on Azure AD attributes. Free tool!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now