# Paths to SDK. Please verify location on your computer.
Add-Type -Path
"c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
"c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
$ctx
=New-Object Microsoft.SharePoint.Client.ClientContext(
$Url
)
$password
= ConvertTo-SecureString -string
$AdminPassword
-AsPlainText -Force
.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials(
$Username
,
$ll
=
.Web.Lists.GetByTitle(
$ListTitle
.Load(
.ExecuteQuery()
$spQuery
= New-Object Microsoft.SharePoint.Client.CamlQuery
$itemki
.GetItems(
$spqQuery
.ViewXml =
"<View Scope='RecursiveAll' />"
;
for
(
$j
=0;
-lt
.
Count
++)
{
[
].ResetRoleInheritance()
}