This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.SharePoint.Client; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Security; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace CSOM.ConsoleApp.Sample | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cls | |
#Import-Module Microsoft.Online.SharePoint.PowerShell | |
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" | |
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" | |
Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.DocumentManagement.dll" | |
#Setting this to True will create new version for any DocSet it identifies that has zero versions existing | |
$CreateNewVersion = $true | |
$AdminPass = "password" | |
$AdminPassword = ConvertTo-SecureString -string $AdminPass -AsPlainText -Force |