Added a check to create the export folder if not exists

This commit is contained in:
d.dekooker committed 2025-03-05 21:59:58 +01:00
1 parent 264f5a5e5c
commit 38a82b6ce8
1 file changed
+2
+2
View File
@@ -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++