Category Archives: PowerShell

Copy Files from SharePoint Library Folder to Another SharePoint Library Folder

$varSourceWebUrl=”http://team/sites/teamsite1″ $varTargetWebUrl=”http://team/sites/teamsite2″ $varSourceLibraryName = “Shared Documents” $varTargetLibraryName = “Shared Documents” $varSourceFolderUrl = “http://team/sites/teamsite1/Shared Documents/Subfolder/” $varTargetParentFolderUrl = “http://team/sites/teamsite2/Shared Documents” $varSourceWeb = Get-SPWeb $varSourceWebUrl $varTargetWeb = Get-SPWeb $varTargetWebUrl $varSourceLibrary = $varSourceWeb.Lists[$varSourceLibraryName] $varTargetLibrary = $varTargetWeb.Lists[$varTargetLibraryName] $varSourceFolder = $varSourceWeb.GetFolder($varSourceFolderUrl) $varTargetFolder = $varTargetWeb.GetFolder($varTargetFolderUrl) $varTargetFolderParent = … Continue reading

Posted in PowerShell, SharePoint 2010, SharePoint Library | Leave a comment

SharePoint Content Database Report using Powershell

#Enter a URL in the function at the bottom of this script Example: Report-SharePointDatabase -ReportURL “http://team/sites/reports” #The first time you run the script, the script will create a custom list with the report fields in a datasheet view #Each subsequent … Continue reading

Posted in PowerShell, SharePoint 2010 | Tagged , , | Leave a comment

SharePoint – PowerShell – Export List Data from a view to CSV and Save in a SharePoint Library

I really like this script.  You create a view in the SharePoint UI with the fields you want, filters, etc., (Script does not include sorting) and it will export that data to a CSV file and save it on your … Continue reading

Posted in PowerShell, SharePoint 2010 | Tagged , , , , | 2 Comments