User Profile
rootwontfall
Copper Contributor
Joined 7 years ago
User Widgets
Recent Discussions
Re: Script to export to CSV all Mailboxes and SharedMailboxes
jerome317 Even making the following command: Get-Mailbox -ResultSize:Unlimited | select displayname,UserPrincipalName,RecipientTypeDetails,@{Name='Mailbox Size';Expression={Get-MailboxStatistics $_.UserPrincipalName | Select TotalItemSize}},@{Name='Licenses';Expression={(Get-MsolUser -UserPrincipalName $_.UserPrincipalName | Select -ExpandProperty Licenses).AccountSKUID}} |Export-Csv -NoTypeInformation .\Desktop\Test.csv It still gives me all columns right unless the column called "Licenses". I've already tried to change the script but the result is the same... I can't export licenses of each mailboxes. Thanks for your help jerome317!50KViews0likes3CommentsRe: Script to export to CSV all Mailboxes and SharedMailboxes
jerome317 The licenses column still blank and I can't understand why. I got one script (the one I used before) to give me that kind of information just like this: Get-MsolUser -All | Select DisplayName,UserPrincipalName,@{n="Licenses";e={$_.Licenses.AccountSKUid}} | Sort-Object DisplayName | Export-Csv -Path C:\temp\MailboxesLicenciadas.csv -NoTypeInformation I tried it like this: Get-Mailbox -ResultSize:Unlimited | select displayname,UserPrincipalName,RecipientTypeDetails,@{Name='Mailbox Size';Expression={Get-MailboxStatistics $_.UserPrincipalName | Select TotalItemSize}},@{Name='Licenses';Expression={Get-MsolUser -UserPrincipalName $_.UserPrincipalName | Select -ExpandProperty Licenses.AccountSKUID}} |Export-Csv -NoTypeInformation C:\temp\FullExport.csv But I can't make it work in your script. Do you've any idea why?51KViews0likes5CommentsRe: Script to export to CSV all Mailboxes and SharedMailboxes
jerome317 I tried the script but that's the same problem that I had. Exporting that kind of information it only displays the following attributes right: DisplayName UserPrincipalName RecipientTypeDetails The other two columns (TotalItemSize and Licenses) are all blank. To get the TotalItemSize I've to use get-mailboxstatistics am I right?50KViews0likes1CommentScript to export to CSV all Mailboxes and SharedMailboxes
Hi, I'm trying to make a new script in Powershell to display (for a report) the following attributes in a CSV table like this: DisplayName UserPrincipalName Licenses RecipientTypeDetails TotalItemSize I need to be displayed the UserMailboxes and SharedMailboxes. I made separated scripts at first but i've to join all information on a unique file and it's a mess. Can anyone help me?53KViews0likes16Comments
Recent Blog Articles
No content to show