Posts

Showing posts with the label Publish Files

Publish files which are not published by users

#Set-ExecutionPolicy Unrestricted #Set-ExecutionPolicy RemoteSigned cls $Host.UI.RawUI.WindowTitle = "-- Publish Files --" $scriptdir = $PSScriptRoot #$DatePrefix ="XML\"+ (Get-Date).ToString("MMddyyyyHHmm") $DatePrefix ="XML\" Write-Host "Loading the CSOM library" -foregroundcolor yellow Add-Type -AssemblyName System.Web # Paths to SDK. Please verify location on your c omputer. Add-Type -Path "$scriptdir\Microsoft.SharePoint.Client.dll" Add-Type -Path "$scriptdir\Microsoft.SharePoint.Client.Runtime.dll" Add-Type -Path "$scriptdir\Microsoft.SharePoint.Client.Publishing.dll" Add-Type -Path "$scriptdir\Microsoft.SharePoint.Client.Taxonomy.dll" Write-Host "Succesfully loaded the CSOM library" -foregroundcolor green # Insert the credentials and the name of the admin site $Username="gaurav@goyal.com"; $AdminPassword=Read-Host -Prompt "Password" -AsSecureString; $AdminUrl=