Script to find specific folder name – search all Exchange mailboxes.

Welcome Forums General PowerShell Q&A Script to find specific folder name – search all Exchange mailboxes.

Viewing 1 reply thread
  • Author
    Posts
    • #235444
      Participant
      Topics: 1
      Replies: 0
      Points: 13
      Rank: Member

      I need to search all our exchange mailboxes to find a specific folder name.   I am trying this but it is taking a long time and may error out.  Any suggestions?

       

      Get-Mailbox -ResultSize Unlimited | Get-MailboxFolderStatistics | Where {$_.Name -Match “ND -Archived (View Only)”} | Export-Csv C:/temp/Users_Folder_Size.csv

       

      Thank you.

    • #235483
      Participant
      Topics: 0
      Replies: 29
      Points: 272
      Helping Hand
      Rank: Contributor

      Hello DZuver58,

      If your mailboxes are on Office365 when  you are creating a session to O365 try to increase IdleTimeout parameter.

      For Example Using ExchangeOnlineShell module:

      https://www.powershellgallery.com/packages/ExchangeOnlineShell/2.0.3.5

      Connect-ExchangeOnlineShell -IdleSessionTimeout Max
      
      

      As far as I know the max value is 43200000 (12 hours)

       

      Hope that helps.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.