Extract Documents to Folder based on Managed Metadata Column - SharePoint

  How to Extract documents from Multiple Document libraries in to Folders. Each has a Managed Metadata Column with Sub Terms. I have created three Functions to  Download Document Create Folder Main Method Addition to above, script will log the Document URL and destination Folder Path in .log file Create Folder   Function   Create-Folder {      param  ( $folderPath )      if  (!( Test-Path  -path  $folderPath ))     {          New-Item   $folderPath  -type directory     } } Download Document ( this is stolen from Stackoverflow 😁 ) Function   Download-Document {      param ( $web ,  $folderPath ,  $docItem )       #File Download Snippet Reffered From : https://stackoverflow.com/questions/43350575/how-to-use-powershell-to-download-files-from-sharepoint        $File  =  $web .GetFile ( $docItem .Url )          $Binary  =  $File .OpenBinary ()          $detinationPath  =  $folderPath  +  "\"  +  $File .Name ;          $Stream  =  New-Object  System.IO.FileStream( $detinationPath

How to Create Host Header to SharePoint Web Application

How to Create Host Header to SharePoint Web Application

  1. Log in to the Server and Open DNS
  2. >
    THost Header and IP Address, Click on Add Host


Create New Web Application

Go to Central Administration and Create your new web application

Create Web Application and Provide the Host header you just created with Port 80
Once you create the Web Application, Create associated site collection.

Edit Bindings in IIS Web Site

Open IIS and find newly created Web Site
2.       Right click and go to Edit Bindings

Add Record to the Server Host File 

Open Note Pad as Administrator and navigate to following location


 Add new record as follows

Disable loop back of the Web Server
  1. Open Registry Editor Navigate to following location

  2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa 
    Create New Value (DisableLoopBackCheck) Type of DWORD and set value to 1

    When we are having several host headers configured in to same port on server we have to add Registry entry. On those mentioned servers that particular registry entry is missing.

Open Registry Editor Navigate to


  1. Create Multi-String Registry Key named BackConnectionHostNames 
  2.  Add all three host headers to the Registry Key 

    • Intranet.ra.com 
    • Myportal.ra.com
    • Survey.ra.com 
  3. Save and close the registry. 
  4. Restart IIS.

Pre-Upgrade Check List

Download Our Free SharePoint Pre-Upgrade Check List

* indicates required

Vintage Clan

Popular posts from this blog

System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission - User Profile Issue

SharePoint 2013 Access Denied in Site Collections in Web Application