functions/mailItems/Get-EXRAllMailboxItems.ps1
function Get-EXRAllMailboxItems { [CmdletBinding()] param ( [Parameter(Position=0, Mandatory=$false)] [string]$MailboxName, [Parameter(Position=1, Mandatory=$false)] [psobject]$AccessToken, [Parameter(Position=2, Mandatory=$false)] [string]$WellKnownFolder, [Parameter(Position=4, Mandatory=$false)] [switch]$ReturnSize, [Parameter(Position=5, Mandatory=$false)] [string]$SelectProperties, [Parameter(Position=6, Mandatory=$false)] [string]$Filter, [Parameter(Position=7, Mandatory=$false)] [string]$PageSize, [Parameter(Position=8, Mandatory=$false)] [string]$OrderBy, [Parameter(Position=9, Mandatory=$false)] [switch]$First, [Parameter(Position=10, Mandatory=$false)] [PSCustomObject]$PropList, [Parameter(Position=11, Mandatory=$false)] [psobject]$ClientFilter, [Parameter(Position=12, Mandatory=$false)] [string]$ClientFilterTop ) Process { if($AccessToken -eq $null) { $AccessToken = Get-ProfiledToken -MailboxName $MailboxName if($AccessToken -eq $null){ $AccessToken = Get-EXRAccessToken -MailboxName $MailboxName } } if([String]::IsNullOrEmpty($MailboxName)){ $MailboxName = $AccessToken.mailbox } Get-EXRWellKnownFolderItems -MailboxName $MailboxName -AccessToken $AccessToken -WellKnownFolder AllItems -ReturnSize:$ReturnSize.IsPresent -SelectProperties $SelectProperties -Filter $Filter -Top $PageSize -OrderBy $OrderBy -TopOnly:$First.IsPresent -PropList $PropList } } |