diff --git a/Content Types/README.md b/Content Types/README.md new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Content Types/README.md @@ -0,0 +1 @@ + diff --git a/OTHER/Remove a single event receiver/description.md b/OTHER/Remove a single event receiver/description.md index e347ba4c..d5f18710 100644 --- a/OTHER/Remove a single event receiver/description.md +++ b/OTHER/Remove a single event receiver/description.md @@ -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" @@ -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. diff --git a/Permissions/Powershell/Get items with unique permissions: SharePoint 2013-2016/Capture211.PNG b/Permissions/Powershell/Get items with unique permissions: SharePoint 2013-2016/Capture211.PNG new file mode 100644 index 00000000..17c53f39 Binary files /dev/null and b/Permissions/Powershell/Get items with unique permissions: SharePoint 2013-2016/Capture211.PNG differ diff --git a/Permissions/Powershell/Get items with unique permissions: SharePoint 2013-2016/OnlyUnique.ps1 b/Permissions/Powershell/Get items with unique permissions: SharePoint 2013-2016/OnlyUnique.ps1 new file mode 100644 index 00000000..2abe5be7 --- /dev/null +++ b/Permissions/Powershell/Get items with unique permissions: SharePoint 2013-2016/OnlyUnique.ps1 @@ -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 + + + +} \ No newline at end of file diff --git a/Permissions/Powershell/Get items with unique permissions: SharePoint 2013-2016/description.md b/Permissions/Powershell/Get items with unique permissions: SharePoint 2013-2016/description.md new file mode 100644 index 00000000..dce547cc --- /dev/null +++ b/Permissions/Powershell/Get items with unique permissions: SharePoint 2013-2016/description.md @@ -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. diff --git a/Permissions/Powershell/Get items, folders, lists with unique permissions: SharePoint 2013-2016/Capture209.PNG b/Permissions/Powershell/Get items, folders, lists with unique permissions: SharePoint 2013-2016/Capture209.PNG new file mode 100644 index 00000000..73e6848c Binary files /dev/null and b/Permissions/Powershell/Get items, folders, lists with unique permissions: SharePoint 2013-2016/Capture209.PNG differ diff --git a/Permissions/Powershell/Get items, folders, lists with unique permissions: SharePoint 2013-2016/OnlyUniqueFLI.ps1 b/Permissions/Powershell/Get items, folders, lists with unique permissions: SharePoint 2013-2016/OnlyUniqueFLI.ps1 new file mode 100644 index 00000000..c08ffba4 --- /dev/null +++ b/Permissions/Powershell/Get items, folders, lists with unique permissions: SharePoint 2013-2016/OnlyUniqueFLI.ps1 @@ -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 + + +} \ No newline at end of file diff --git a/Permissions/Powershell/Get items, folders, lists with unique permissions: SharePoint 2013-2016/description.md b/Permissions/Powershell/Get items, folders, lists with unique permissions: SharePoint 2013-2016/description.md new file mode 100644 index 00000000..6f3174c7 --- /dev/null +++ b/Permissions/Powershell/Get items, folders, lists with unique permissions: SharePoint 2013-2016/description.md @@ -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.