Exchange 2010 Powershell Suspend-MoveRequest

I have a simple PowerShell Command to suspend all move request at a certain time.
When I run the command I am prompted to confirm Y, A , N ,L.

Is there a way to bypass that prompt so I can automate the task?
LVL 27
yo_beeDirector of Information TechnologyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Satyendra SharmaMicrosoft UC Technical ArchitectCommented:
Just add "-confirm $false" parameter this will disable the prompts.

The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.
yo_beeDirector of Information TechnologyAuthor Commented:
here is the error I get:

Here is my command

Get-MoveRequest | Where-Object {$_.Status -ne 'Completed'} | Suspend-MoveRequest -Confirm $false

A positional parameter cannot be found that accepts argument 'False'.
    + CategoryInfo          : InvalidArgument: (:) [Suspend-MoveRequest], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,Suspend-MoveRequest
Subash SundharanIT Infrastructure Architect Commented:
Get-MoveRequest | Where-Object {$_.Status -ne 'Completed'} | Suspend-MoveRequest -Confirm:$false

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
yo_beeDirector of Information TechnologyAuthor Commented:
Thanks to both of you suggestions  
I weighted the points more towards Subsun for the overall resolution to why it was not working.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.