Extract Documents to Folder based on Managed Metadata Column - SharePoint

Image
  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 Name Site Collection in SharePoint 2013

How to Create Host Name Site Collection in SharePoint 2013


To Create Host Name Site Collections, you have to follow below few steps as a summary.
  1. Before you create any site collection, first of all, create all the DNS Entries you need to create as host name site collections.
  2. Execute following through PowerShell command to create site collections with Host Name
    1. Create Web Application without a host header
    2. Create Root Site collection without any host header
    3. Create rest of the site collections as you want with Host Headers
  3. DO NOT create host header for Root Site Collection

  • Create Root Web Application (No Host Header)
  • Create Root Site Collection


New-SPSite 'http://sp2013-1' -Name 'Portal' -Description 'Portal on root' -OwnerAlias 'Domain\SpSetupAdmin' -language 1033 -Template 'STS#0'

Create Content Database if you want to have a separate database for the site collection Create Host Named Site Collection
New-SPSite ‘http://Alakamanda.Sigiriya.Lk' -HostHeaderWebApplication ‘http://sp2013-1' -Name 'Portal' -Description 'Customer root' -OwnerAlias 'Ra\SpSetupAdmin' -language 1033 -Template 'STS#0'


You can have Detailed information From TechNet

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

How to Create Host Header to SharePoint Web Application

SharePoint 2013 Access Denied in Site Collections in Web Application