title: Powershell Check the folder structure exists or not
body: <p>i am on a task to upgrading a batch file to powershell.. i have to perform a task that need to check if the folder structure is exist or not. if not create it from where it missing. Also need to send a mail using smtp about the status...</p>
  
  <pre><code>example: 
  
  D:\folder\folder1\folder2\folder3
  E:\folder\folder1\folder2\folder3
  E:\folderA\folderB\FolderC\FolderD\FolderE
  </code></pre>
  
  <p>if missing only <code>FolderC</code> and Rest create from <code>FolderC\FolderD\FolderE</code></p>
  
  <p>if missing from <code>FolderB</code> and rest create from <code>FolderB\FolderC\FolderD\FolderE</code></p>