Created
November 6, 2019 16:17
-
-
Save kevinblumenfeld/f76edc56ada85f2da204148e4fcb009a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$AllMailboxes = Import-Clixml -Path (Join-Path ([Environment]::GetFolderPath("Desktop")) AllMailboxes.xml) | |
$del = for ($i = 0 ; $i -lt $MailboxCount; $i++) { | |
[pscustomobject]@{ | |
Count = $i | |
DisplayName = $AllMailboxes[$i].displayname | |
PrimarySmtpAddress = $AllMailboxes[$i].PrimarySmtpAddress | |
OU = $AllMailboxes[$i].OrganizationalUnit | |
} | |
} | |
$del | Export-csv -Path (Join-Path -Path ([Environment]::GetFolderPath("Desktop")) -ChildPath 'NumberedMailboxes.csv') -NoTypeInformation -Encoding UTF8 | |
$del = $null | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment