Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DeleteContents from mailbox with no confirmation (exchange 2010 and powershell)

I use the following command to delete the contents of a mailbox, but it still prompts me to confirm. Is there a way to not prompt me.

Search-Mailbox -id "UserName" -DeleteContent -Confirm:$false
like image 602
RPS Avatar asked Oct 11 '22 02:10

RPS


1 Answers

The way to stop prompting is to use the -Force parameter (if the cmdlet supports it).

Setting -Confirm to $false just means "prompt me if you need to." Setting -Confirm to $true means "prompt me every time."

like image 101
JasonMArcher Avatar answered Oct 13 '22 14:10

JasonMArcher