Posts

Showing posts from March, 2020

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

Get-SPFarmDetails Get SharePoint Farm Configuration Information

Image
As part of upgrade process I had to document all my UAT, Prod and DR farm details. Instead of going each server/farm and writing down all Farm Information, was able to come up with below functions with little help of Microsoft Documents about PowerShell. In below Example I have written multiple PowerShell Functions to read each section Managed Paths , Web App Information, Out going Email information, Application Pool Details (both Web Application and Service Applications) Each function will create Separate Out put CSV file Application Pool Information Below Get-AppPoolDetails Function will read and log both Web Application and Service Application Related Application Pool information in to a CSV File Function   Get-AppPoolDetails {      $spwebApplications  =  Get-SPWebApplication ;      #Get Web Application Related Application Pool Information    Add-Content  -Path  $AppPoolOutput  -Value  " App Pool Type|WebApplication or Service| App Pool Name| App Pool

Pre-Upgrade Check List

Download Our Free SharePoint Pre-Upgrade Check List

* indicates required

Vintage Clan