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 SharePoint 2013 User Profile Service

How to Create SharePoint 2013 User Profile Service


To Create SharePoint 2013 User Profile Service, you need to have below prerequisites
  1. Configure Manage Meta Data Service
  2. Configure Search Service
  3. Business Data Connectivity Service (Optional)
  4. Farm account should be member of Local Administrators Group when Synchronization is start for first time.
  5. Service Account Should have Permission “Replicating Directory Changes” in Active Directory

    1. Navigate to Active Directory Users and Computers
    2. Add Service User Account
    3. Click next and Select “Custom Task to Delegate” Option button
    4. Click Next and again next.
    5. In Permissions Page, Select “Replicating Directory Changes” Option in the list
    6. Finish the wizard.


  1. Replicating permission in AD. For this follow the below steps.
    a.       Log on to AD Server as the domain administrator.
    b.      Start Active Directory Users And Computers and enable Advance Features.
    c.       Open the Properties for the domain and click the Security tab.
    d.      Add the upc/upc.spuserprofilesyncacc to the list.
    e.      Assign the following permissions to the upc/upc.spuserprofilesyncacc account:
                                                                   i.      Replicating Directory Changes
                                                                 ii.      Replicating Directory Changes All
                                                                iii.      Replicating Directory Changes In Filtered Set
    Replication synchronization

Configure User Profile Service 

1. Manage Service Applications within Application Management. 
2. In the Create group on the ribbon, from the new menu, select User Profile Service Application. 
3. Assign a name to the new UPA. 
4. In the Application Pool section, either select an existing application pool (one already created for services) or build a new application pool. Specify a managed account that should run this application pool (most often, this account runs all the service applica¬tions unless your security policy forbids it). 

5. Type the configuration values for the Profile, Synchronization, and Social Tagging databases, using the following choices: A. Select an appropriate database name, following the conventions of your environment. 
1. B. For the authentication section, select Windows Authentication (recommended). 
2. C. If you are using mirroring, specify the name of your failover server

6. Type the My Site host address and My Site Manage Path information. 
7. You may not have this information yet. It’s covered shortly and can be added in to the configuration after the UPA is created. 
8. In the site naming section, choose a naming format that is best suited to your environment 
9. Specify whether you want to associate the UPA with the default proxy group.

Start Service


  1. Enable Fim Services ( by default they are disabled) 
  2. Navigate to Services on the Farm Server
  3. System Settings -> Services on the Server -> Start following Services




  • For the first time when you start the Synchronization service, make sure Farm administrator is a member of Local Administrators group
  • Better if u can restart the server once you start the User Profile Synchronization Service



  • Create Active Directory Connection


    You need to use same account which you gave “Replicating Directory Changes” in previous step

    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