Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
d72247f
Update description.md
JakubPiegza Feb 28, 2020
8fe5a22
Update NoCrawl.ps1
JakubPiegza Feb 28, 2020
4d08327
Update description.md
JakubPiegza Feb 28, 2020
2924b98
Update FolderCreationForAllLists.ps1
JakubPiegza Feb 28, 2020
8e3a4b8
Update description.md
JakubPiegza Feb 28, 2020
b7da366
Update SetUniquePermissions for all lists.ps1
JakubPiegza Feb 28, 2020
bf186ff
Update description.md
JakubPiegza Feb 28, 2020
dde2de6
Update NoCrawlForAllLists.ps1
JakubPiegza Feb 28, 2020
6e0a912
Update description.md
JakubPiegza Feb 28, 2020
27a4cb5
Update FindcheckedoutfilesANDcheckthemIN.ps1
JakubPiegza Feb 28, 2020
6754b0a
Update description.md
JakubPiegza Feb 28, 2020
36ff778
Update FindcheckedoutfilesbyONEUSERANDcheckthemIN.ps1
JakubPiegza Feb 28, 2020
8649936
Update description.md
JakubPiegza Feb 28, 2020
56612df
Update ListCheckout.psm1
JakubPiegza Feb 28, 2020
e9fc5f8
Update and rename description.txt to description.md
JakubPiegza Feb 28, 2020
0701d05
Update ForceCheckout.ps1
JakubPiegza Feb 28, 2020
1a838ba
Update description.md
JakubPiegza Feb 28, 2020
aa45a38
Update CheckOutModule.psm1
JakubPiegza Feb 28, 2020
e3fa865
Update description.md
JakubPiegza Feb 28, 2020
ce3e39b
Update AddColumnWithFullName.ps1
JakubPiegza Feb 28, 2020
b6e026a
Update description.md
JakubPiegza Feb 28, 2020
a880632
Update AddColumnWithFullName2.ps1
JakubPiegza Feb 28, 2020
ce70943
Update description.md
JakubPiegza Feb 28, 2020
3cd6da3
Update NewChoiceColumn.psm1
JakubPiegza Feb 28, 2020
96acfb2
Update description.md
JakubPiegza Feb 28, 2020
10a711d
Update description.md
JakubPiegza Feb 28, 2020
594bf03
Update description.md
JakubPiegza Feb 28, 2020
0f7e615
Update description.md
JakubPiegza Feb 28, 2020
dda43d0
Update NewColumnWithProperties.psm1
JakubPiegza Feb 28, 2020
8f24730
Update description.md
JakubPiegza Feb 28, 2020
592e2d0
Update ListColumnFunctions.psm1
JakubPiegza Feb 28, 2020
89118b8
Update description.md
JakubPiegza Feb 28, 2020
21e8c7b
Update RemoveSPOListColumn.ps1
JakubPiegza Feb 28, 2020
73355b0
Update description.md
JakubPiegza Feb 28, 2020
e6316d9
Update NewSPOList.psm1
JakubPiegza Feb 28, 2020
0cc1476
Update description.md
JakubPiegza Feb 28, 2020
651e0d3
Update DeleteUniquePermissionsfor all lists.ps1
JakubPiegza Feb 28, 2020
4e702f2
Update description.md
JakubPiegza Feb 28, 2020
4a517ea
Update CopyListFolderStruAcross2.ps1
JakubPiegza Feb 28, 2020
b05e86d
Update description.md
JakubPiegza Feb 28, 2020
8b3803d
Update CopyListFolderStruAcrossTenants.ps1
JakubPiegza Feb 28, 2020
d974e5d
Update description.md
JakubPiegza Feb 28, 2020
e185284
Update CopyFolderStructure1.ps1
JakubPiegza Feb 28, 2020
f811398
Update description.md
JakubPiegza Feb 28, 2020
20796b7
Update CopyListFolderStru.ps1
JakubPiegza Feb 28, 2020
82f9183
Update description.md
JakubPiegza Feb 28, 2020
0dd3a88
Update GetSPOListEventReceivers.ps1
JakubPiegza Feb 28, 2020
eddfe8e
Update description.md
JakubPiegza Feb 28, 2020
5a2b34a
Update Get-SPOListTemplate.ps1
JakubPiegza Feb 28, 2020
42c21f6
Update description.md
JakubPiegza Feb 28, 2020
9afa757
Update GetSPOListModule.psm1
JakubPiegza Feb 28, 2020
73d5825
Update description.md
JakubPiegza Feb 28, 2020
4d8e470
Update GetSPOListCountModule.psm1
JakubPiegza Feb 28, 2020
59bb1af
Update description.md
JakubPiegza Feb 28, 2020
34056eb
Update SetExperience.ps1
JakubPiegza Feb 28, 2020
44cba0d
Update description.md
JakubPiegza Feb 28, 2020
48b6c09
Update GetExperienceWithREST.ps1
JakubPiegza Feb 28, 2020
792b6f7
Update description.md
JakubPiegza Feb 28, 2020
f964ef1
Update GetExperience (1).ps1
JakubPiegza Feb 28, 2020
4178eef
Update description.md
JakubPiegza Feb 28, 2020
e276bcb
Update SetListFunctions.psm1
JakubPiegza Feb 28, 2020
665df87
Update description.md
JakubPiegza Feb 28, 2020
07284d0
Update DirectionForAllLists.ps1
JakubPiegza Feb 28, 2020
637bfe6
Update description.md
JakubPiegza Feb 28, 2020
75467ba
Update ListDirection.ps1
JakubPiegza Feb 28, 2020
d2e9724
Update description.md
JakubPiegza Feb 28, 2020
f54bfb6
Update SPOFolderFilesVersions.ps1
JakubPiegza Feb 28, 2020
72ede56
Update description.md
JakubPiegza Feb 28, 2020
1cda7ca
Update SPOFolderFilesVersions.ps1
JakubPiegza Feb 28, 2020
92faa68
Update description.md
JakubPiegza Feb 28, 2020
d8ac215
Update DeleteFileVersions.ps1
JakubPiegza Feb 28, 2020
aa0d3d2
Update description.md
JakubPiegza Feb 28, 2020
ae76833
Update EnableMinorVersionsOneSite.ps1
JakubPiegza Feb 28, 2020
0c0a594
Update description.md
JakubPiegza Feb 28, 2020
bf78fdd
Update MinorVersioningForOneList.ps1
JakubPiegza Feb 28, 2020
6e196bd
Update description.md
JakubPiegza Feb 28, 2020
c962022
Update VersioningForOneSite.ps1
JakubPiegza Feb 28, 2020
33b2e42
Update description.md
JakubPiegza Feb 28, 2020
1413da5
Update VersioningForOneList.ps1
JakubPiegza Feb 28, 2020
0635a31
Update description.md
JakubPiegza Feb 28, 2020
179db19
Update GetViews.ps1
JakubPiegza Feb 28, 2020
5fa5923
Update description.md
JakubPiegza Feb 28, 2020
4fccc55
Update Remove-SPOListView.ps1
JakubPiegza Feb 28, 2020
d8d9dd3
Update Remove-SPOListView.ps1
JakubPiegza Feb 28, 2020
8cacbbf
Update description.md
JakubPiegza Mar 1, 2020
668b50c
Update excerpt.cs
JakubPiegza Mar 1, 2020
619079b
Merge branch 'develop' into pr/138
PowershellScripts Mar 25, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,38 @@
# Created by Arleta Wanat, 2015
#

function Set-SPOList
{
param (
function Set-SPOList{
param (
[Parameter(Mandatory=$true,Position=0)]
[string]$ListName,
[string]$ListName,
[Parameter(Mandatory=$true,Position=1)]
[bool]$NoCrawl
)
[bool]$NoCrawl
)

$ll=$ctx.Web.Lists.GetByTitle($ListName)
$ll.NoCrawl = $NoCrawl
$ll.Update()

try
{
try{
$ctx.ExecuteQuery()
Write-Host "Done" -ForegroundColor Green
}

catch [Net.WebException]
{

}
catch [Net.WebException] {
Write-Host "Failed" $_.Exception.ToString() -ForegroundColor Red
}


}
}



function Connect-SPOCSOM
{
param (
[Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$AdminPassword,
function Connect-SPOCSOM{
param (
[Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$AdminPassword,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url
)

[string]$Url
)

$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
$ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,13 @@
A short Powershell script to allow or disallow crawling on a SharePoint Online list.



It corresponds to the Search setting available under List>List Settings>Advanced in the User Interface:




It corresponds to the Search setting available under **List**>**List Settings**>**Advanced in the User Interface**:




<img src="../Allow or disallow list items to appear in search/NoCrawl.png">

It requires installed SharePoint Online SDK
It requires installed [SharePoint Online SDK](http://www.microsoft.com/en-us/download/details.aspx?id=42038)

You have to enter the list information before running the script:




```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"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,49 +1,42 @@

#
# Created by Arleta Wanat, 2015
#

function Set-SPOListsFolderCreation
{
param (
[Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$AdminPassword,
function Set-SPOListsFolderCreation{
param (
[Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$AdminPassword,
[Parameter(Mandatory=$true,Position=3)]
[string]$Url,
[string]$Url,
[Parameter(Mandatory=$true,Position=4)]
[bool]$EnableFolderCreation
)
[bool]$EnableFolderCreation
)

$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
$ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
$ctx.ExecuteQuery()

$Lists=$ctx.Web.Lists
$ctx.Load($Lists)
$ctx.ExecuteQuery()

Foreach($ll in $Lists)
{
$ll.EnableFolderCreation = $EnableFolderCreation
$ll.Update()


try
{
$ctx.ExecuteQuery()
Write-Host $ll.Title " Done" -ForegroundColor Green
}

catch [Net.WebException]
{

$Lists=$ctx.Web.Lists
$ctx.Load($Lists)
$ctx.ExecuteQuery()

Foreach($ll in $Lists){
$ll.EnableFolderCreation = $EnableFolderCreation
$ll.Update()


try{
$ctx.ExecuteQuery()
Write-Host $ll.Title " Done" -ForegroundColor Green
}
catch [Net.WebException] {
Write-Host "Failed" $_.Exception.ToString() -ForegroundColor Red
}

}
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ If you disable the button, you and your users will not be able to create folders

Applies to lists and libraries





It requires installed SharePoint Online SDK
It requires installed [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038)

You have to enter the list information before running the script:

Expand All @@ -26,19 +22,15 @@ $Url="https://trialtrial123.sharepoint.com/sites/teamsitewithlists"
$EnableFolderCreation=$false
```

## **Results**

### Results




<img src="../Allow or disallow users to create folders/EnableFolderCreation.png">

### Related scripts
Set direction of the reading order for a single list
[Set direction of the reading order for a single list](https://gallery.technet.microsoft.com/office/Set-the-direction-of-the-f17ca66a)

Set-SPOList properties (module)
[Set-SPOList properties (module)](https://gallery.technet.microsoft.com/office/Set-SPOList-properties-9d16f2ba)


<br/><br/>
<b>Enjoy and please share your comments and questions!</b>
<b>Enjoy and please share your comments and questions!</b>
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
function Set-SPOListBreakRoleInheritance
{

param (
function Set-SPOListBreakRoleInheritance{
param (
[Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
[Parameter(Mandatory=$true,Position=3)]
[string]$AdminPassword,
[string]$AdminPassword,
[Parameter(Mandatory=$false,Position=4)]
[bool]$IncludeSubsites=$false
)
[bool]$IncludeSubsites=$false
)



Expand All @@ -23,45 +21,26 @@
$ctx.ExecuteQuery()
Write-Host
Write-Host $ctx.Url -BackgroundColor White -ForegroundColor DarkGreen
foreach( $ll in $ctx.Web.Lists)
{


foreach( $ll in $ctx.Web.Lists){
$ll.BreakRoleInheritance($true, $false)
$ll.Update()
$ll.Update()

try
{
$ctx.ExecuteQuery()
Write-Host "Removed inherited permissions for " $ll.Title
try{
$ctx.ExecuteQuery()
Write-Host "Removed inherited permissions for " $ll.Title
}
catch
{
Write-Host "Failed to remove permissions for " $ll.Title
}



catch{
Write-Host "Failed to remove permissions for " $ll.Title
}









if($ctx.Web.Webs.Count -gt 0 -and $IncludeSubsites)
{
for($i=0; $i -lt $ctx.Web.Webs.Count ; $i++)
{
Set-SPOListBreakRoleInheritance -Url ($ctx.Web.Webs[$i].Url) -Username $Username -AdminPassword $AdminPassword -IncludeSubsites $IncludeSubsites
}

}


}
if($ctx.Web.Webs.Count -gt 0 -and $IncludeSubsites){
for($i=0; $i -lt $ctx.Web.Webs.Count ; $i++){
Set-SPOListBreakRoleInheritance -Url ($ctx.Web.Webs[$i].Url) -Username $Username -AdminPassword $AdminPassword -IncludeSubsites $IncludeSubsites
}
}
}


# Paths to SDK. Please verify location on your computer.
Expand All @@ -70,4 +49,4 @@ Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extens



Set-SPOListBreakRoleInheritance -Username "trial@trialtrial123.onmicrosoft.com" -Url "https://trialtrial123.sharepoint.com" -AdminPassword "Pass" -IncludeSubsites $false
Set-SPOListBreakRoleInheritance -Username "trial@trialtrial123.onmicrosoft.com" -Url "https://trialtrial123.sharepoint.com" -AdminPassword "Pass" -IncludeSubsites $false
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
Powershell script to break inherited permissions for all lists in a site collection.



Before you run it, you have to modify the last line of the script!




**Before you run it, you have to modify the last line of the script!**

```PowerShell
# Paths to SDK. Please verify location on your computer.
Expand All @@ -18,36 +12,24 @@ Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extens
Set-SPOListBreakRoleInheritance -Username "trial@trialtrial123.onmicrosoft.com" -Url "https://trialtrial123.sharepoint.com" -AdminPassword "Pass" -IncludeSubsites $false
```

Enter your credentials and the site where you want to modify the inheritance.
Set -IncludeSubsites $true if you want to break inheritance also in the subsites
Set -IncludeSubsites $false if you want to break inheritance only in the main/root site
Verify if the SharePoint Online SDK is installed in the same location on your computer


+ Enter your credentials and the site where you want to modify the inheritance.
+ Set -IncludeSubsites $true if you want to break inheritance also in the subsites
+ Set -IncludeSubsites $false if you want to break inheritance only in the main/root site
+ Verify if the [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038) is installed in the same location on your computer

<img src="../Break inheritance for all SPO lists in a site/uniquepermS.png">

## **Related scripts:**

[Restore inheritance for all lists](https://gallery.technet.microsoft.com/scriptcenter/Delete-Unique-Permissions-91be8246)







### Related scripts:

Restore inheritance for all lists

Modify inherited permissions for a SharePoint Online site (module)

Modify list permissions with Powershell cmdlets (module)

Delete unique permissions (C# program)

Get lists with unique permissions (C# program)
[Modify inherited permissions for a SharePoint Online site (module)](https://gallery.technet.microsoft.com/scriptcenter/Modify-Web-Inherited-125aaa54)

[Modify list permissions with Powershell cmdlets (module)](https://gallery.technet.microsoft.com/scriptcenter/Powershell-Module-for-b88bc2d9)

[Delete unique permissions (C# program)](https://gallery.technet.microsoft.com/scriptcenter/ResetRoleInhertienace-04f5c544)

[Get lists with unique permissions (C# program)](https://gallery.technet.microsoft.com/scriptcenter/Get-Lists-with-Unique-90c4321b)

<br/><br/>
<b>Enjoy and please share your comments and questions!</b>
<b>Enjoy and please share your comments and questions!</b>
Loading