Added a check to create the export folder if not exists
This commit is contained in:
@@ -3,6 +3,8 @@ $Mailboxes = Get-Mailbox -ResultSize Unlimited
|
|||||||
$TotalMailboxes = $Mailboxes.Count
|
$TotalMailboxes = $Mailboxes.Count
|
||||||
$CurrentMailbox = 0
|
$CurrentMailbox = 0
|
||||||
|
|
||||||
|
if (!(test-path $ExportPath)) {mkdir $ExportPath}
|
||||||
|
|
||||||
foreach ($Mailbox in $Mailboxes) {
|
foreach ($Mailbox in $Mailboxes) {
|
||||||
$CurrentMailbox++
|
$CurrentMailbox++
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user