< Back

Get-LaMailboxOldestItem

Sun Jan 19, 2020 6:27 pm

NAME Get-LaMailboxOldestItem



SYNOPSIS

Reports on the oldest item in a mailbox(es)



3 methods to search for the oldest item



1. Without any switches, searches entire mailbox not including the recoverable items folders 2. With

-IncludeRecoverableItems switch, searches entire mailbox including recoverable items folders 3. With

-RecoverableItemsOnly switch, searches only the recoverable items folders





SYNTAX

Get-LaMailboxOldestItem [-userprincipalname] <String> [-IncludeRecoverableItems] [-RecoverableItemsOnly]

[<CommonParameters>]





DESCRIPTION

Users Additionally, each case's hold (Exchange and/or SharePoint) are returned.





PARAMETERS

-IncludeRecoverableItems [<SwitchParameter>]

{{Include Recoverable Items Folder in the search for the oldest item}}



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-RecoverableItemsOnly [<SwitchParameter>]

{{Recoverable Items Folders are the only folders searched while looking for the oldest item in the mailbox}}



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-userprincipalname <String>

{{UPNs are passed from the pipeline}}



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- EXAMPLE 1 --------------------------



Import-Csv .\\upns.csv | Get-LaMailboxOldestItem | Out-GridView



Reports on the oldest item in the mailbox not including the recoverable items folders

-------------------------- EXAMPLE 2 --------------------------



Get-Mailbox -ResultSize unlimited | Get-LaMailboxOldestItem -IncludeRecoverableItems



Reports on the oldest item in the mailbox including the recoverable items folders

-------------------------- EXAMPLE 3 --------------------------



Get-Recipient -Filter "Department -eq 'Human Resources'" -RecipientType mailuser | Get-LaMailboxOldestItem

-RecoverableItemsOnly



Reports on the oldest item in the mailbox - only searches in the recoverable items folders



RELATED LINKS