Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Join 2 cmdlets to get a report

$
0
0

Hi Scripting Guys!

I have 2 cmdlets to get a exchange 2007 report, and every cmdlet recovers different information for the same user, so I have to join every by excel.

Is there a way to get both information joined in one shot? I don't have any knowledge of programming :)

This is one cmdlet:

Get-Mailbox -server ms05 -resultsize unlimited | Select-Object DisplayName,SamAccountName,UserPrincipalName,@{N="UserAccountControl";E={ $_.UserAccountControl -JOIN ' | '}},UseDatabaseRetentionDefaults,OrganizationalUnit,RetainDeletedItemsFor,PrimarySmtpAddress,@{N="EmailAddresses";E={ $_.EmailAddresses -JOIN ' | '}},WindowsEmailAddress,WhenCreated,WhenChanged,HiddenFromAddressListsEnabled,@{N="AddressListMembership";E={ $_.AddressListMembership -JOIN '; '}},UseDatabaseQuotaDefaults,@{label="IssueWarningQuota (MB)";expression={$_.IssueWarningQuota.Value.ToMB()}},@{label="ProhibitSendQuota (MB)";expression={$_.ProhibitSendQuota.Value.ToMB()}},@{label="ProhibitSendReceiveQuota (MB)";expression={$_.ProhibitSendReceiveQuota.Value.ToMB()}},ForwardingAddress,DeliverToMailboxAndForward,RecipientLimits,ManagedFolderMailboxPolicy,@{N="GrantSendOnBehalfTo";E={ $_.GrantSendOnBehalfTo -JOIN '|'}},@{label="MaxSendSize (MB)";expression={$_.MaxSendSize.Value.ToMB()}},@{label="MaxReceiveSize (MB)";expression={$_.MaxReceiveSize.Value.ToMB()}},Database | Export-CSV -Path d:\ms\ms05.txt -Delimiter "`t"  -Encoding Unicode -NoTypeInformation

This is the other cmdlet:

Get-MailboxStatistics -Server ms05 | Select-Object DisplayName,Database,ObjectClass,StorageLimitStatus,@{label="Total Size (MB)";expression={$_.TotalItemSize.Value.ToMB()}},@{label="Total Delete (MB)";expression={$_.TotalDeletedItemSize.Value.ToMB()}}, ItemCount,DeletedItemCount,LastLogoffTime,LastLogonTime | Export-CSV -Path d:\ms\ms05a.txt -Delimiter "`t"  -Encoding Unicode -NoTypeInformation

Thank you.


Doc MX


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>