-
- Service Provider
- Posts: 9
- Liked: 1 time
- Joined: Jun 06, 2017 5:24 pm
- Full Name: Stephen Carnes
- Contact:
Powershell command to list users and mailbox count
Powershell command to list users and mailbox count for each organization. Is this possible? Is there another report that would give me this information?
-
- Product Manager
- Posts: 8191
- Liked: 1322 times
- Joined: Feb 08, 2013 3:08 pm
- Full Name: Mike Resseler
- Location: Belgium
- Contact:
Re: Powershell command to list users and mailbox count
Hi Stephen,
First: Welcome to our forums!
I'm not sure what you exactly need but I think you can use this cmdlet from VBO to get what you need: https://helpcenter.veeam.com/docs/vbo36 ... tml?ver=15
First: Welcome to our forums!
I'm not sure what you exactly need but I think you can use this cmdlet from VBO to get what you need: https://helpcenter.veeam.com/docs/vbo36 ... tml?ver=15
-
- Service Provider
- Posts: 9
- Liked: 1 time
- Joined: Jun 06, 2017 5:24 pm
- Full Name: Stephen Carnes
- Contact:
Re: Powershell command to list users and mailbox count
Thank you for getting back to me! Im just trying to give a report to our finance department that lists each organization with the number of backed up mailboxes. However, when I try to run the powershell command i get the following error. Any ideas?
PS C:\Users\apex> Get-VBOOrganizationMailbox -Organization - Name "XXXX.onmicrosoft.com"
Get-VBOOrganizationMailbox : Cannot bind parameter 'Organization'. Cannot convert the "-" value of type
"System.String" to type "Veeam.Archiver.PowerShell.Model.VBOOrganization".
At line:1 char:42
+ Get-VBOOrganizationMailbox -Organization - Name "APEXTMI.onmicrosoft.com"
+ ~
+ CategoryInfo : InvalidArgument: (:) [Get-VBOOrganizationMailbox], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Archiver.PowerShell.Cmdlets.Mailboxes.GetVBOOrganiz
ationMailbox
PS C:\Users\apex> Get-VBOOrganizationMailbox -Organization - Name "XXXX.onmicrosoft.com"
Get-VBOOrganizationMailbox : Cannot bind parameter 'Organization'. Cannot convert the "-" value of type
"System.String" to type "Veeam.Archiver.PowerShell.Model.VBOOrganization".
At line:1 char:42
+ Get-VBOOrganizationMailbox -Organization - Name "APEXTMI.onmicrosoft.com"
+ ~
+ CategoryInfo : InvalidArgument: (:) [Get-VBOOrganizationMailbox], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Archiver.PowerShell.Cmdlets.Mailboxes.GetVBOOrganiz
ationMailbox
-
- Veeam Software
- Posts: 3191
- Liked: 774 times
- Joined: Oct 21, 2011 11:22 am
- Full Name: Polina Vasileva
- Contact:
Re: Powershell command to list users and mailbox count
Hi Stephen,
Please make sure you run VBO PowerShell Toolkit (the "burger" menu -> PowerShell)
Please make sure you run VBO PowerShell Toolkit (the "burger" menu -> PowerShell)
-
- Product Manager
- Posts: 5796
- Liked: 1215 times
- Joined: Jul 15, 2013 11:09 am
- Full Name: Niels Engelen
- Contact:
Re: Powershell command to list users and mailbox count
Hi Stephen,
Remove the - and name. This is causing the error, as it only needs -organization to get all the mailboxes. If you use -name, you can filter by a specific mailbox.
Remove the - and name. This is causing the error, as it only needs -organization to get all the mailboxes. If you use -name, you can filter by a specific mailbox.
Code: Select all
Get-VBOOrganizationMailbox -Organization "XXXX.onmicrosoft.com"
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
GitHub: https://github.com/nielsengelen
-
- Service Provider
- Posts: 9
- Liked: 1 time
- Joined: Jun 06, 2017 5:24 pm
- Full Name: Stephen Carnes
- Contact:
Re: Powershell command to list users and mailbox count
Still seems I get the same error with -Name removed. Even though this is the correct organization name? Whats the VBO toolbox you are referring too?
PS C:\Users\apex> Get-VBOOrganizationMailbox -Organization "APEXTMI.onmicrosoft.com"
Get-VBOOrganizationMailbox : Cannot bind parameter 'Organization'. Cannot convert the "APEXTMI.onmicrosoft.com" value
of type "System.String" to type "Veeam.Archiver.PowerShell.Model.VBOOrganization".
At line:1 char:42
+ Get-VBOOrganizationMailbox -Organization "APEXTMI.onmicrosoft.com"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-VBOOrganizationMailbox], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Archiver.PowerShell.Cmdlets.Mailboxes.GetVBOOrganiz
ationMailbox
PS C:\Users\apex>
PS C:\Users\apex> Get-VBOOrganizationMailbox -Organization "APEXTMI.onmicrosoft.com"
Get-VBOOrganizationMailbox : Cannot bind parameter 'Organization'. Cannot convert the "APEXTMI.onmicrosoft.com" value
of type "System.String" to type "Veeam.Archiver.PowerShell.Model.VBOOrganization".
At line:1 char:42
+ Get-VBOOrganizationMailbox -Organization "APEXTMI.onmicrosoft.com"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-VBOOrganizationMailbox], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Veeam.Archiver.PowerShell.Cmdlets.Mailboxes.GetVBOOrganiz
ationMailbox
PS C:\Users\apex>
-
- Product Manager
- Posts: 5796
- Liked: 1215 times
- Joined: Jul 15, 2013 11:09 am
- Full Name: Niels Engelen
- Contact:
Re: Powershell command to list users and mailbox count
Hereby working code:
Code: Select all
$org = Get-VBOOrganization -Name "APEXTMI.onmicrosoft.com"
Get-VBOOrganizationMailbox -Organization $org
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
GitHub: https://github.com/nielsengelen
-
- Service Provider
- Posts: 9
- Liked: 1 time
- Joined: Jun 06, 2017 5:24 pm
- Full Name: Stephen Carnes
- Contact:
Re: Powershell command to list users and mailbox count
Thank you! That worked.
Now just one more question. Is there anyway I can use that to get a count of all backed up mailboxes per organization? Just a simple list?
Now just one more question. Is there anyway I can use that to get a count of all backed up mailboxes per organization? Just a simple list?
-
- Veeam Software
- Posts: 3191
- Liked: 774 times
- Joined: Oct 21, 2011 11:22 am
- Full Name: Polina Vasileva
- Contact:
Re: Powershell command to list users and mailbox count
Out-of-the-box you can get a list of unprotected (not assigned to any of the backup jobs) mailboxes by adding the "NotInJob" parameter to the above code.
Then you can simply compare the two lists - all mailboxes vs not in the jobs mailboxes..
Then you can simply compare the two lists - all mailboxes vs not in the jobs mailboxes..
Who is online
Users browsing this forum: No registered users and 8 guests