문제

I have this script. Looking to include, deleted items, sent items and drafts in the output.

Whats the best way to include that?

Thanks

Get-MailboxFolderStatistics myuserename -FolderScope Inbox | Where {$_.FolderPath -eq "/Inbox"}
도움이 되었습니까?

해결책 2

get-mailboxfolderstatistics myusername | where {$_.name -match "Inbox|Deleted|Sent|Calendar|Drafts"} | sort-object Name | ft Name, FolderPath, ItemsInFolder, FolderSize -auto

다른 팁

The easiest way I know of is to filter multiple folders at once is to use -match and a regex alternation:

Get-MailboxFolderStatistics myuserename |
 Where {$_.FolderPath -match  '/Inbox|/Deleted Items|/Sent Items|/Drafts'}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top