Good afternoon all,

Using something similar to the following script is it possible to delete all items from nested folders in Outlook leaving the folders intact. The Structure is

Inbox\@SQLAlerts\Server1

Inbox\@SQLAlerts\Server2

Inbox\@SQLAlerts\Server3

Inbox\@SQLAlerts\Server4

```
$Outlook = New-Object -comobject “Outlook.Application”
$MAPI = $Outlook.getnamespace(“mapi”)
$Inbox = $MAPI.GetDefaultFolder(6)
$SubFolder = $Inbox.Folders | Where-Object {$_.Name -eq “@SQLAlerts”}
$date = (Get-Date).AddDays(-1)
$SubFolder.items | Where-Object {$_.SentOn -lt $date} | ForEach-Object 
{$_.Delete()}

```