SELECT LEFT(MbxDisplayName,20) AS 'Mailbox', ExchangeComputer AS 'Exchange Server', MbxItemCount AS '#Items (Mailbox)', VS1.ArchivedItems AS '#Items (Archive)', MbxSize/1024 AS 'Mbx Size (MB)', VS1.ArchivedItemsSize/1024 AS 'Archive Size(MB)', (mbxsize+VS1.ArchivedItemsSize)/1024 AS 'Total Size(MB)', VS1.CreatedDate AS 'Archive Created', VS1.ModifiedDate AS 'Archive Updated', MbxExchangeState AS 'Exchange State' FROM EnterpriseVaultDirectory.dbo.ExchangeMailboxEntry AS EME, EnterpriseVaultDirectory.dbo.ExchangeServerEntry AS ESE, EVVaultStore01..ArchivePoint AS VS1 WHERE EME.DefaultVaultID = VS1.ArchivePointID AND EME.ExchangeServerIdentity = ESE.ExchangeServerIdentity
If you have more than one Vault Store you will need to join this with a union
UNION SELECT LEFT(MbxDisplayName,20) AS 'Mailbox', ExchangeComputer AS 'Exchange Server', MbxItemCount AS '#Items (Mailbox)', VS2.ArchivedItems AS '#Items (Archive)', MbxSize/1024 AS 'Mbx Size (MB)', VS2.ArchivedItemsSize/1024 AS 'Archive Size(MB)', (mbxsize+VS2.ArchivedItemsSize)/1024 AS 'Total Size(MB)', VS2.CreatedDate AS 'Archive Created', VS2.ModifiedDate AS 'Archive Updated', MbxExchangeState AS 'Exchange State' FROM EnterpriseVaultDirectory.dbo.ExchangeMailboxEntry AS EME, EnterpriseVaultDirectory.dbo.ExchangeServerEntry AS ESE, EVVaultStore02..ArchivePoint AS VS2 WHERE EME.DefaultVaultID = VS2.ArchivePointID AND EME.MbxArchivingState = 1 AND EME.ExchangeServerIdentity = ESE.ExchangeServerIdentity
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.