PowerShell: Download Documents/Files from SharePoint OnPrem

$Spsite = get-spsite http://contoso.com #Replace this with Site Collection URL $Location = “C:\destination” #Replace with Folder on file level system where you want to download the files and folders $AllWebs = $SpSite.AllWebs function DownloadFiles ($SiteFolder , $Web , $List) { $Web = Get-Spweb $Web $list = $web.Lists.GetList($list,$true) $items = $list.Items foreach($item in $items) { $FileBinary…


OneDrive–Check for Long File names

Following script will check for Long File Names,Folders and File+Folders. Any location which contains more then (249 – User OneDrive Folder Length) will be reported, This outout is stored in a Share with UserName_ComputerName Format. THis can be run as Scheduled tasks   $OneDriveLocationLength =  $Env:OneDrive.Length$LengthToCheck = 249 – $OneDriveLocationLength$SyncFile = “\\NetworkShare\OneDriveSyncissues\” + $Env:USERNAME +…


Replace Invalid/Illegal/UnSupport Characters in OneDrive for Business

  Following Script can be set as a Scheduled task on End User Computers. This script will check for Invalid File Names inside OneDrive([!&{}~#%]) and Rename them. It also stores the Mapping file containing Old name and new name in End User OneDrive(OneDrive Mapping File.csv). Mapping file is appended and not recreated.     $OneDriveLocation…