Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Content Types/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 2 additions & 1 deletion OTHER/Remove a single event receiver/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A short solution to remove a single event receiver from your SPO lists.

3. Scroll down to these lines

PowerShell
```PowerShell
# 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"
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
Expand All @@ -21,6 +21,7 @@ $ListTitle="kriiv"
$EventReceiverGUID="154d2ca2-8335-464c-9059-214cdcc1c2c1"

Get-SPOListEventreceivers -Username $Username -AdminPassword $AdminPassword -Url $Url -ListTitle $ListTitle -EventReceiverGUID $EventreceiverGUID
```
4. Check if the 2 libraries are in the same location on your computer. If yes, proceed on. If no, change the paths in the file. Usually you will be required to change folder name "15" into "16".

5. Instead of admin@tenant.onmicrosoft.com, enter the name of your site collection admin.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

$webUrl="Enter here the url of your site, e.g. https://intra.Company.com"
$pathToExportReport="c:\MyCSV.csv"

Add-PSSnapin Microsoft.SharePoint.PowerShell

$web=Get-SPWeb $webUrl

$lists=$web.Lists

foreach($list in $lists)
{
Write-Host "Processing list "$list.Title
Write-Host " ........... Items count: " $list.ItemCount
$items=$list.Items
$uniqueItemsCount=0
foreach($item in $items)
{


if($item.HasUniqueRoleAssignments)
{

$item | export-csv $pathToExportReport -Append
$uniqueItemsCount++

}

}
Write-Host " ........... Unique items count: " $uniqueItemsCount



}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Short script to get the number of items with unique permissions per list. The scripts loops through all the lists in a single web and finds items with unique permissions. The items and their properties also get exported to a csv file.







Before running the script, you need to open the file and enter correct information:



```PowerShell
$webUrl="Enter here the url of your site, e.g. https://intra.Company.com"
$pathToExportReport="c:\MyCSV.csv"
```


End results:





The script requires SharePoint Management Shell.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

$webUrl="http://nicename:17007/sites/devSite"
$pathToExportReport="c:\MyCSV.csv"

Add-PSSnapin Microsoft.SharePoint.PowerShell

$web=Get-SPWeb $webUrl

$lists=$web.Lists

foreach($list in $lists)
{
Write-Host "Processing list "$list.Title
Write-Host " .... List has unique permissions: " $list.HasUniqueRoleAssignments
Write-Host " ........... Items count: " $list.ItemCount
Write-Host " ........... Folders count: " $list.Folders.Count

$folders=$list.Folders
$uniqueFolders=0
foreach($folder in $folders)
{
if($folder.HasUniqueRoleAssignments)
{
$folder | Export-Csv $pathToExportReport -Append
$uniqueFolders++
}

}


$items=$list.Items
$uniqueItemsCount=0
foreach($item in $items)
{


if($item.HasUniqueRoleAssignments)
{

$item | export-csv $pathToExportReport -Append
$uniqueItemsCount++

}

}
Write-Host " ........... Unique items count: " $uniqueItemsCount
Write-Host " ........... Unique folders count: " $uniqueFolders


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Short script to get the number of items and folders with unique permissions per list. The scripts loops through all the lists in a single web and displays whether the list has unique permissions, the number of folders with unique permissions and the number of items with unique permissions. The items, folders, and their properties also get exported to a csv file.







Before running the script, you need to open the file and enter correct information:

```PowerShell
$webUrl="Enter here the url of your site, e.g. https://intra.Company.com"
$pathToExportReport="c:\MyCSV.csv"
```


End result:







The script requires SharePoint Management Shell.