Monday, March 21, 2016

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) on Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser, etc.

Problem: Getting "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" on running PowerShell cmdlets, such as: Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser, etc.
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) on Get-SPWeb, New-SPUser, Get-SPUser, Set-SPUser

Solution: 
Add a web application user policy with Full control for the Farm Administrator who runs the Script!
  • Open SharePoint 2016/2013/2010 Central Administration site as a Farm Administrator
  • Click Application Management >> Select Manage Web Applications.
  • Select your target web application >> Click the User Policy button from the ribbon.
  • From the Policy for Web Application dialog box, click on "Add Users" link.
  • Select All Zones for the web application and click on Next
  • Enter the user account and Select the permission policy level as "Full Control"
  • Click Finish to save your changes. 


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Tuesday, March 15, 2016

Remove Checkbox from SharePoint Listview Web Part

Requirement:
Remove checkbox from SharePoint 2016 listview header! For a SharePoint links list, we had to remove checkbox from listview.

Solution: 
To remove checkbox in SharePoint list header, follow these steps:
  • Click on "Modify View" button from the List Tab of the ribbon menu.
  • Scroll down and uncheck "Allow individual item checkboxes" tick mark under Tabular View!
     sharepoint 2013 remove checkbox from listview
  • Click on "OK" button to save your changes. This removes the checkbox in list view.
Remove checkbox in SharePoint xsltlistviewwebpart:
For Dataview/XSLTListViewwebpart, Open the view page in SharePoint Designer, Edit the list view page, Set TabularView="False" under "View" tag to remove checkbox!
 
Remove checkbox from SharePoint list using PowerShell:
Use this PowerShell script to remove checkbox from listview web part.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Configuration Parameters
$WebURL="http://intranet.crescent.com/"
$ListName="Quick Links"
$ViewName="All Links"

#Get web, List and View objects
$Web = Get-SPWeb $WebURL
$List = $Web.Lists[$ListName]
$View = $List.Views[$ViewName]

#sharepoint view remove checkbox
$View.TabularView = $False
$View.Update()
Write-host "Checkboxes Removed from SharePoint View!"
and here is the result:
sharepoint 2013 remove checkbox listview


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


How to Enable Client Integration in SharePoint 2013

Client integration setting in SharePoint enables or disables SharePoint-Client applications integration, such as starting client application based on the document types. It also provides features such as Open in Explorer view, Upload multiple documents, Edit in datasheet, etc.

Enable client integration in SharePoint 2013 central administration
SharePoint client integration is not enabled in forms authentication, by default. To activate client integration in SharePoint, follow these steps:
  • Go to SharePoint 2013 Central Administration >> Application Management >> Click on "Manage Web Applications" under Web Applications.
  • Select your target web application for which you would like to enable or disable client integration.
  • Click on "Authentication Providers" button from the ribbon.
    sharepoint 2013 client integration setting
  • Click on the Zone name - Default in the "Authentication Providers" popup.
    sharepoint 2013 enable client integration
  • In the edit authentication providers page, under "Client Integration" section, Set "Enable Client Integration?" setting to "Yes".
    sharepoint client integration disable
  • Click Save to commit your changes.

SharePoint permission to use client integration features:
Although the client integration is enabled or disabled at web application level, in order to utilize client integration features, user must be granted with "Use Client Integration Features" permission from his/her permission level.
  • From site settings >> Click on Site Permissions >>Click on Permission Levels button from the ribbon
  • Pick the permission level granted to the user, such as "Edit" or some other custom permission level
  • You'll see list of base permissions associated with the particular permission level. Under Site Permissions, make sure "Use Client Integration Features" is selected.
    sharepoint permission use client integration features
SharePoint 2013 enable-disable client integration using PowerShell:
In some cases, you may have to disable client integration feature in SharePoint.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Configuration parameters
$WebAppURL="http://intranet.crescent.com/"
$Zone="Default"
$ClientIntegrationOption=$False

#Get the web application and current setting
$WebApp = Get-SPWebApplication $WebAppURL
$webApp.IisSettings[$Zone].EnableClientIntegration

#enable or disable client integration
$webApp.IisSettings[$Zone].EnableClientIntegration = $ClientIntegrationOption
$WebApp.Update()
Based on the option you specified in the $ClientIngrationOption flag, it either enables or disables client integration feature.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


SharePoint 2016 RTM is Released!

So the waiting period is over! SharePoint 2016 is in its RTM now!
sharepoint 2016 RTM download

Download SharePoint 2016 RTM Trial from here: https://www.microsoft.com/en-us/download/details.aspx?id=51493

180 day Trial key: NQGJR-63HC8-XCRQH-MYVCH-3J3QR

What's New: Fast Site Collection Creation, Durable Links, Hybrid Features, MinRoles, Large File support, etc.

What's Lost: No more SharePoint Foundation, No Stand-alone Install Mode (with SQL Express), No FIM, etc.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Sunday, March 13, 2016

Disable Continuous Crawl in SharePoint 2013 using PowerShell

Continuous Crawl in SharePoint 2013 helps to keep the search results upto date. In some situations like maintenance, Index reset, etc you may have to turn-off continuous crawl in SharePoint. To disable continuous crawl on a specific SharePoint content source, Follow these steps:
  • Login to SharePoint 2013 Central Administration as a Farm administrator. In Central Administration, Under Application Management, click on Manage service applications,
  • and Pick your Search service application
  • In Search Service Administration page, click on Content Sources link under Crawling section of the left navigation menu.
  • In the Manage Content Sources page, click on the drop down arrow from the SharePoint content source to which you want to disable continuous crawl.
  • Select Disable Continuous crawl and Confirm that you want to disable continuous crawl by clicking OK. You can also disable continuous crawl by selecting Incremental Crawls option from the edit content sources page, which disables continuous crawl. 
    sharepoint 2013 disable continuous crawl powershell
SharePoint 2013 disable continuous crawl using PowerShell:
Use this PowerShell script to disable continuous crawl for a specific content source in SharePoint 2013 or SharePoint 2016.
#Get Search service application
$SSA =  Get-SPEnterpriseSearchServiceApplication
 
#Get the content source by name
$ContentSource = Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $SSA -Identity "Local SharePoint sites"
 
#Check if Continuous Crawls is already disabled
if($ContentSource.EnableContinuousCrawls -eq $False)
{
    Write-host "Continuous Crawl is already Disabled on this content source!" -ForegroundColor Red
}
else
{
    #Disable continuous crawl sharepoint 2013
    Set-SPEnterpriseSearchCrawlContentSource -Identity $ContentSource -EnableContinuousCrawls $False
    Write-host "Disabled Continuous Crawl Successfully!" -ForegroundColor Green
}

Disable continuous crawl SharePoint 2016 with PowerShell
Lets disable continuous crawl for all SharePoint content sources.
#Get Search service application
$SSA =  Get-SPEnterpriseSearchServiceApplication

#Get all SharePoint content sources
$SPContentSources = Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $SSA | Where-object {$_.Type -eq "SharePoint"} 

foreach ($ContentSource in $SPContentSources) 
{ 
    #Check if Continuous Crawls is disabled already
    if($ContentSource.EnableContinuousCrawls -eq $false)
    {
     Write-host "Continuous Crawl is already Disabled for $($ContentSource.Name)!" -ForegroundColor Yellow
    }
    else
    {
        #enable continuous crawl sharepoint 2013
        Set-SPEnterpriseSearchCrawlContentSource -Identity $ContentSource -EnableContinuousCrawls $False
     Write-host "Disabled Continuous Crawl Successfully for $($ContentSource.Name)" -ForegroundColor Green
    }
}


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Enable Continuous Crawl in SharePoint 2013 using PowerShell

Continuous Crawl was introduced in SharePoint 2013 to keep the search results as fresh as possible.
To enable Continuous crawl in SharePoint 2013, follow these steps:
  • Login to SharePoint 2013 Central Administration as a Farm Administrator. In Central Administration, Click on Manage service applications under the Application Management tab
  • Click on your Search service application.
  • In the Search Service Administration page, click on Content Sources link from the left navigation.
  • On the Manage Content Sources page, click the SharePoint content source to which you want to enable continuous crawl.
  • Scroll down and select "Enable Continuous Crawls" option under the Crawl Schedules section.
    sharepoint 2013 enable continuous crawl powershell
  • Click OK to save your changes.
SharePoint 2016: Enable continuous crawl with PowerShell
Here is the PowerShell script to enable continuous crawl in SharePoint 2013 or SharePoint 2016.
#Get Search service application
$SSA =  Get-SPEnterpriseSearchServiceApplication

#Get the content source by name
$ContentSource = Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $SSA -Identity "Local SharePoint sites"

#Check if Continuous Crawls is already enabled
if($ContentSource.EnableContinuousCrawls -eq $true)
{
 Write-host "Continuous Crawl is already Enabled for this content source!" -ForegroundColor Red
}
else
{
        #enable continuous crawl sharepoint 2013
        Set-SPEnterpriseSearchCrawlContentSource -Identity $ContentSource -EnableContinuousCrawls $True
        Write-host "Enabled Continuous Crawl Successfully!" -ForegroundColor Green
}

Enable continuous crawl for all SharePoint 2013 content sources using PowerShell
While the above script enables Continuous crawl for given content source name, Lets enable continuous crawl for all SharePoint content source in SharePoint 2016:
#Get Search service application
$SSA =  Get-SPEnterpriseSearchServiceApplication

#Get all SharePoint content sources
$SPContentSources = Get-SPEnterpriseSearchCrawlContentSource -SearchApplication $SSA | Where-object {$_.Type -eq "SharePoint"} 

foreach ($ContentSource in $SPContentSources) 
{ 
    #Check if Continuous Crawls is already enabled
    if($ContentSource.EnableContinuousCrawls -eq $true)
    {
 Write-host "Continuous Crawl is already Enabled for $($ContentSource.Name)!" -ForegroundColor Yellow
    }
    else
    {
        #enable continuous crawl sharepoint 2013
        Set-SPEnterpriseSearchCrawlContentSource -Identity $ContentSource -EnableContinuousCrawls $True
        Write-host "Enabled Continuous Crawl Successfully for $($ContentSource.Name)" -ForegroundColor Green
    }
}


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Set SharePoint 2013 Continuous Crawl Interval using PowerShell

Continuous crawl helps to keep the search results as fresh as possible. By default, SharePoint 2013 continuous crawl frequency is set to 15 minutes. In some cases, you may have to adjust the schedule for continuous crawl frequency. This can be done only through PowerShell as there is no GUI to adjust continuous crawl schedule.

SharePoint 2013 continuous crawl interval using PowerShell
Use this PowerShell script to set continuous crawl frequency in SharePoint 2013 or SharePoint 2016.

Get the current crawl schedule
$SearchServiceApp = Get-SPEnterpriseSearchServiceApplication
$SearchServiceApp.GetProperty("ContinuousCrawlInterval")

SharePoint 2013 continuous crawl interval PowerShell:
#Set sharepoint continuous crawl interval
$SearchServiceApp = Get-SPEnterpriseSearchServiceApplication
$SearchServiceApp.SetProperty("ContinuousCrawlInterval",5)
This sets the continuous crawl frequency to 5 Minutes. Related Post: SharePoint 2013 continuous crawl explained

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


The Database name located at the specified database server contains user-defined data.- Error in SharePoint Products Configuration Wizard

Error:
SharePoint Products Configuration Wizard:  
The Database name located at the specified database server contains user-defined data. Databases must be empty before they can be used. Delete all of the tables, stored procedures, and other objects, or use a different database.
The Database name located at the specified database server contains user-defined data

Root cause:
This is due to the fact, previous installation failed in between and left the SharePoint_Config database in SQL Server!

Solution:
Delete the SharePoint_Config database created by the previous installation!


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Saturday, March 12, 2016

Change Timer Job Schedule in SharePoint using PowerShell

Requirement:  Change timer job schedule in SharePoint for "User Profile Service Application - Activity Feed Job".

Solution: To Set SharePoint timer job schedule, follow these steps:
  • Go to the Central Administration >> Monitoring >> Timer Job >> Review job definitions
  • Find "User Profile Service Application - Activity Feed Job", 
  • In Edit Timer job page, set up the activity feed sync time according to your needs. By default, its set to run for every 10 Minutes.
    sharepoint timer job schedule powershell
SharePoint PowerShell to change timer job schedule
SharePoint 2013 timer job Schedules can be set through the Set-SPTimerJob cmdlet. Here is the PowerShell script to change timer job schedule.
#Timer job Display name 
$TimerJobName="User Profile Service Application - Activity Feed Job"

#Get the Timer job
$TimerJob = Get-SPTimerJob | Where-Object { $_.displayname -like $TimerJobName }

#Set sharepoint timer job schedule powershell
Get-SPTimerJob $TimerJob | Set-SPTimerJob -Schedule "Every 5 minutes between 0 and 59"

Write-host "Timer Job Schedule updated!" -ForegroundColor Green
This script sets the timer job schedule to 5 minutes!

Technet reference for Set-SPTimer job cmdlet: https://technet.microsoft.com/en-us/library/ff607916.aspx

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Enable-Disable Timer Jobs using PowerShell in SharePoint

Timer jobs perform specific tasks in SharePoint through Windows Timer service, such as sending email alerts at a scheduled time. In SharePoint Central Administration site you can check the timer jobs, disable or enable specific timer jobs.

PowerShell Script to Check Timer Job Status:
#Function to Check Timer job status
Function Get-TimerJobStatus($TimerJobName)
{
    $TimerJob = Get-SPTimerJob | Where-Object { $_.displayname -like $TimerJobName } 
    if($TimerJob -eq $null)
    {
        Write-host "Timer job not found!" -ForegroundColor Red
        return
    }
    $TimerJobDisabled = $TimerJob | Select -ExpandProperty IsDisabled
    if($TimerJobDisabled)
    {
        Write-host "Timer Job is Disabled!"  -ForegroundColor Yellow
    }
    else
    {
        Write-host "Timer Job is Enabled!"  -ForegroundColor Green
    }
    
}

$TimerJobName="My Site Cleanup Job"
Get-TimerJobStatus $TimerJobName

How to Disable a Timer job in SharePoint?
To disable a timer job, Head on to Central Administration >> Monitoring >> Timer Jobs >> Review job definitions >> pick your target from the list of timer jobs in SharePoint 2013 >> Click on "Disable" button to disable a Timer job.
disable sharepoint timer job powershell

Disable SharePoint timer job using PowerShell
#Function to Disable a Timer job
Function Disable-TimerJob($TimerJobName)
{
    $TimerJob = Get-SPTimerJob | Where-Object { $_.displayname -like $TimerJobName } 
    if($TimerJob -eq $null)
    {
        Write-host "Timer job not found!" -ForegroundColor Red
        return
    }
    $TimerJobDisabled = $TimerJob | Select -ExpandProperty IsDisabled
    if($TimerJobDisabled)
    {
        Write-host "Timer Job is already Disabled!" -ForegroundColor Yellow
    }
    else
    {
        $TimerJob | Disable-SPTimerJob 
        Write-host "Timer Job Disabled!" -ForegroundColor Green
    }
    
}

#Timer job name to disable
$TimerJobName="My Site Cleanup Job"

#Call the function to Disable Timer job
Disable-TimerJob $TimerJobName

Activate timer job in SharePoint:
To activate a disabled timer job, Go to:
  • Central Administration >> Monitoring >> Timer Jobs 
  • Review job definitions >> pick your target from the list of timer jobs in SharePoint 2013 
  • Click on "Enable" button to activate the timer job.
enable timer job using powershell in sharepoint
This enables the disabled timer job in SharePoint 2013.

SharePoint enable timer job with PowerShell:
#Function to Enable a Timer job
Function Enable-TimerJob($TimerJobName)
{
    $TimerJob = Get-SPTimerJob | Where-Object { $_.displayname -like $TimerJobName } 
    if($TimerJob -eq $null)
    {
        Write-host "Timer job not found!" -ForegroundColor Red
        return
    }
    $TimerJobDisabled = $TimerJob | Select -ExpandProperty IsDisabled
    if($TimerJobDisabled)
    {
        $TimerJob | Enable-SPTimerJob 
        Write-host "Timer Job Enabled!" -ForegroundColor Green
    }
    else
    {
        Write-host "Timer Job is Already Enabled!" -ForegroundColor Yellow
    }    
}

#Timer job name to Enable
$TimerJobName="My Site Cleanup Job"

#Call the function to Enable Timer job
Enable-TimerJob $TimerJobName 
This activates timer job in SharePoint 2010 with PowerShell.

You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Wednesday, March 9, 2016

SharePoint Online: Export List Items to CSV using PowerShell

Requirement: 
Export SharePoint online list items to CSV file from client side.

PowerShell script to Export SharePoint List Items to CSV from Client Side (CSOM):
#Load SharePoint CSOM Assemblies
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
 
##Variables for Processing
$SiteUrl = "https://crescent.sharepoint.com/sites/poc/"
$ListName="Employee"
$ExportFile ="c:\Scripts\ListRpt.csv"
$UserName="Salaudeen@crescent.com"
$Password ="Password goes here"

#Setup Credentials to connect
$Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($UserName,(ConvertTo-SecureString $Password -AsPlainText -Force))

#Set up the context
$Context = New-Object Microsoft.SharePoint.Client.ClientContext($SiteUrl) 
$Context.Credentials = $credentials
 
#Get the List
$List = $Context.web.Lists.GetByTitle($ListName)

#Get All List Items
$Query = New-Object Microsoft.SharePoint.Client.CamlQuery
$ListItems = $List.GetItems($Query)
$context.Load($ListItems)
$context.ExecuteQuery()

#Array to Hold List Items 
$ListItemCollection = @() 

#Fetch each list item value to export to excel
 $ListItems |  foreach {
    $ExportItem = New-Object PSObject 
    $ExportItem | Add-Member -MemberType NoteProperty -name "Title" -value $_["Title"]
    $ExportItem | Add-Member -MemberType NoteProperty -Name "Department" -value $_["Department"]
  
    #Add the object with above properties to the Array
    $ListItemCollection += $ExportItem
 }
#Export the result Array to CSV file
$ListItemCollection | Export-CSV $ExportFile -NoTypeInformation 

Write-host "List data Exported to CSV file successfully!"

Related Posts:


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Wednesday, March 2, 2016

Copy Files Between Document Libraries in SharePoint using PowerShell

Here is my PowerShell script to copy files between SharePoint document libraries:

PowerShell Script to Copy a File from One Library to Another:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Variables for Processing
$WebURL="https://portal.crescent.com/sites/Sales/"
$SourceFile="https://portal.crescent.com/sites/Sales/TeamDocs/InvoiceTemp.xlsx"
$TargetLibrary="Invoice Documents"

#Get Objects
$Web = Get-SPWeb $WebURL
$SourceFile = $Web.GetFile($SourceFile)
$TargetLibrary = $Web.GetFolder($TargetLibrary)

#Copy the file into the Target library
$File = $TargetLibrary.Files.Add($SourceFile.Name, $SourceFile.OpenBinary(), $true)

#Copy Meta-Data
$Item = $File.Item
$item["Created"] = $SourceFile.TimeCreated.ToLocalTime()
$item["Modified"] = $SourceFile.TimeLastModified.ToLocalTime()
$item["Author"] = $SourceFile.Author
$item["Editor"] = $SourceFile.ModifiedBy
#Update
$Item.UpdateOverwriteVersion()

PowerShell Script to Copy All Files Between Document Libraries:
Lets copy all files and folder from one library to another along with their meta-data (Excluding: the above!)
sAdd-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Custom Function to Copy Files from Source Folder to Target
Function Copy-Files($SourceFolder, $TargetFolder)
{
    write-host "Copying Files from:$($SourceFolder.URL) to $($TargetFolder.URL)"
    #Get Each File from the Source 
    $SourceFilesColl = $SourceFolder.Files

    #Iterate through each item from the source
    Foreach($SourceFile in $SourceFilesColl) 
    {
        #Copy File from the Source
        $NewFile = $TargetFolder.Files.Add($SourceFile.Name, $SourceFile.OpenBinary(),$True)
 
        #Copy Meta-Data from Source
        Foreach($Field in $SourceFile.Item.Fields)
        {
            If(!$Field.ReadOnlyField)
            {
                if($NewFile.Item.Fields.ContainsField($Field.InternalName))
                {
                    $NewFile.Item[$Field.InternalName] = $SourceFile.Item[$Field.InternalName]
                }
            }
        }
        #Update
        $NewFile.Item.UpdateOverwriteVersion()
    
        Write-host "Copied File:"$SourceFile.Name
    }
    
    #Process SubFolders
    Foreach($SubFolder in $SourceFolder.SubFolders)
    {
        if($SubFolder.Name -ne "Forms")
        {
            #Check if Sub-Folder exists in the Target Library!
            $NewTargetFolder = $TargetFolder.ParentWeb.GetFolder($SubFolder.Name)
 
            if ($NewTargetFolder.Exists -eq $false)
            {
                #Create a Folder
                $NewTargetFolder = $TargetFolder.SubFolders.Add($SubFolder.Name)
            }
            #Call the function recursively
            Copy-Files $SubFolder $NewTargetFolder
        }
    }
}

#Variables for Processing
$WebURL="http://portal.crescent.com/sites/sales/"
$SourceLibrary ="Team Docs"
$TargetLibrary = "Sales Documents"

#Get Objects
$Web = Get-SPWeb $WebURL
$SourceFolder = $Web.GetFolder($SourceLibrary)
$TargetFolder = $Web.GetFolder($TargetLibrary)

#Call the Function to Copy All Files
Copy-Files $SourceFolder $TargetFolder

Copy Documents between Sites, Site Collections, Web Applications:
How about copying between Sites? Well, just change the below lines in the script.
#Variables for Processing
$SourceWeb = "http://Your-Source-Web-URL"
$TargetWeb = "http://Your-Target-Web-URL"

$SourceLibrary ="Team Docs"
$TargetLibrary = "Shared Documents"

$SourceFolder = $Source.GetFolder($SourceLibrary)
$TargetFolder = $TargetWeb.GetFolder($TargetLibrary)

#Call the Function to Copy All Files
Copy-Files $SourceFolder $TargetFolder


You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


You might also like:

Related Posts Plugin for WordPress, Blogger...