diff --git a/Exchange/Export-all-mailboxes.ps1 b/Exchange/Export-all-mailboxes.ps1 index bd8c464..cec9a2a 100644 --- a/Exchange/Export-all-mailboxes.ps1 +++ b/Exchange/Export-all-mailboxes.ps1 @@ -3,6 +3,8 @@ $Mailboxes = Get-Mailbox -ResultSize Unlimited $TotalMailboxes = $Mailboxes.Count $CurrentMailbox = 0 +if (!(test-path $ExportPath)) {mkdir $ExportPath} + foreach ($Mailbox in $Mailboxes) { $CurrentMailbox++