
Test all mailboxes in a store (in this case using the test-exchangesearch cmdlet)
Two variants...# database is identified using -database parameter
# and the db's Identity string
get-mailbox -database Server1\Sg1\Db1 |
foreach {
write-host $_.Alias; (test-exchangesearch $_ |
select ResultFound,SearchTime |
ft -auto)
}
Typical output:
WalkerTest
ResultFound SearchTime
----------- ----------
False -1
# Run Test with a one-per-line output reporting just Alias & SearchTime:
get-mailbox -database Server1\SG1\DB1 |
foreach { `
write-host ($_.Alias + " ") -NoNewline ;
(test-exchangesearch $_).SearchTime ;
}
Typical output:
WalkerTest 101
TestMailbox 115
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.