I have been using the enclosed script to do bulk search of compliance in Exchange and create export of pst files for resigned users. But while scheduling this as task, the script stops after creating export for one user and wait for user confirmation with Yes or no prompt. Hence the task does not complete and wait in running stage itself.
Can someone go through the script and let us know how to avoid this confirmation prompt? I tried looking at various posts but don't know where to put the $confirm:False value in the script.