I am using Exchange 2010 and trying to run a PowerShell to export all users that have a User mailbox, I am using the PowerShell below
Get-Mailbox -resultsize unlimited -recipienttypedetails UserMailbox | Get-MailboxPermission | export-csv c:\User_mailbox.csv -NoTypeInformation
However our environment hasn't been consistent when creating User Mailboxes, there are some Shared Mailboxes that appear as User Mailboxes when I look through the above-exported file.
Is there a way I can add a filter, attribute or pipe in the PowerShell command so only the 'User' field pulls data that are numeric values and not alpha values?
This is because I know a User Mailbox will only have numbers as their SamAccountname example 11368 and won't be joe.bloggs.
Thanks