title: powershell script to list all sub-folders in an Outlook Inbox
body: <p>New powershell user here. I want a list of all folders and subfolders and subsubfolders etc. from an Outlook Inbox</p>
  
  <pre><code>Add-Type -assembly "Microsoft.Office.Interop.Outlook"
  $Outlook = New-Object -comobject Outlook.Application
  $namespace = $Outlook.GetNameSpace("MAPI")
  Get-ChildItem -Directory $namespace
  </code></pre>
  
  <blockquote>
    <p>The term 'FileInfo' is not recognized as the name of a cmdlet,
    function, script file, or operable program. Check the spelling of the
    name, or if a path was included, verify that the path is correct and
    try again.</p>
  </blockquote>