Raoul
New Member
- OS Version(s)
- Windows
- Outlook version
- Outlook 365 64 bit
- Email Account
- Exchange Server
Operating system:: Windows
Outlook version: Classic outlook
Email type or host: Excahnge & IMAP
Outlook version: Classic outlook
Email type or host: Excahnge & IMAP
Hello,
I am running outlook with one main exchange mailbox and 3 other IMAP mailboxes. One of the IMAP mailboxes is generating various empty duplicate folders with '111....' etc as a suffix.
On the MS forum there is a solution to this provided by the owner of this forum, I believe which is a powershell script shown below.
***************************
I would like to modify this script to target say the IMAP2 email in an outlook environment as shown below:
I have various "X111...." type folders to delete but they are all at the same level as INBOX in that IMAP2 email.
Thanks in advance.
I am running outlook with one main exchange mailbox and 3 other IMAP mailboxes. One of the IMAP mailboxes is generating various empty duplicate folders with '111....' etc as a suffix.
On the MS forum there is a solution to this provided by the owner of this forum, I believe which is a powershell script shown below.
***************************
$Outlook = New-Object -comobject "Outlook.Application"
$MAPI = $Outlook.getnamespace(“mapi”)
$Folder= $MAPI.GetDefaultFolder(6)
# Delete subfolders that begin with the same keyword
# This sample deletes folders at the same level as Inbox
$SubFolder = $Folder.Parent.Folders | Where-Object {$_.Name -like "Archive1*"}
$SubFolder | % {$_.Delete()}
# End Delete folders
# permanently delete subfolders from Deleted items folder
$Deleted = $MAPI.GetDefaultFolder(3)
$SubFolder = $Trash.Folders | Where-Object {$_.Name -like "Archive1*"}
$SubFolder | % {$_.Delete()}
# End permanently delete folders
$olApp.Quit | Out-Null
[GC]::Collect()
*****************************I would like to modify this script to target say the IMAP2 email in an outlook environment as shown below:
OUTLOOK
->Exchange email
->IMAP1
->IMAP2
->IMAP3
I have various "X111...." type folders to delete but they are all at the same level as INBOX in that IMAP2 email.
Thanks in advance.