diff --git a/Content Types/Create/Add existing content type directly to SPO list/AddExistingContentTypetoOneList.ps1 b/Content Types/Create/Add existing content type directly to SPO list/AddExistingContentTypetoOneList.ps1
index 43825fba..b03c128d 100644
--- a/Content Types/Create/Add existing content type directly to SPO list/AddExistingContentTypetoOneList.ps1
+++ b/Content Types/Create/Add existing content type directly to SPO list/AddExistingContentTypetoOneList.ps1
@@ -1,47 +1,40 @@
-function Add-SPOContentType
-{
-param(
-[Parameter(Mandatory=$true,Position=1)]
+function Add-SPOContentType{
+ param(
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
- [Parameter(Mandatory=$true,Position=2)]
+ [Parameter(Mandatory=$true,Position=2)]
$AdminPassword,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=4)]
+ [Parameter(Mandatory=$true,Position=4)]
[string]$ListTitle,
- [Parameter(Mandatory=$true,Position=7)]
+ [Parameter(Mandatory=$true,Position=7)]
[string]$ContentTypeID
- )
-
- $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
- $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
- $ctx.Load($ctx.Web.Lists)
- $ctx.ExecuteQuery()
-
- $contentType=$ctx.Web.ContentTypes.GetById($ContentTypeID)
- $ctx.Load($contentType)
-
- $ll=$ctx.Web.Lists.GetByTitle($ListTitle)
- $ctx.load($ll)
- $ctx.load($ll.ContentTypes)
- $ctx.ExecuteQuery()
- $ll.ContentTypesEnabled=$true
- $AddedContentType=$ll.ContentTypes.AddExistingContentType($contentType)
- $ll.Update()
-
- try
- {
-
- $ctx.ExecuteQuery()
- Write-Host "Adding content type " $AddedContentType.Name " to " $ll.Title
- }
- catch [Net.WebException]
- {
- Write-Host $_.Exception.ToString()
- }
-
-
-
+ )
+
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
+ $ctx.Load($ctx.Web.Lists)
+ $ctx.ExecuteQuery()
+
+ $contentType=$ctx.Web.ContentTypes.GetById($ContentTypeID)
+ $ctx.Load($contentType)
+
+ $ll=$ctx.Web.Lists.GetByTitle($ListTitle)
+ $ctx.load($ll)
+ $ctx.load($ll.ContentTypes)
+ $ctx.ExecuteQuery()
+ $ll.ContentTypesEnabled=$true
+ $AddedContentType=$ll.ContentTypes.AddExistingContentType($contentType)
+ $ll.Update()
+
+ try{
+ $ctx.ExecuteQuery()
+ Write-Host "Adding content type " $AddedContentType.Name " to " $ll.Title
+ }
+ catch [Net.WebException]{
+ Write-Host $_.Exception.ToString()
+ }
}
diff --git a/Content Types/Create/Add existing content type directly to SPO list/description.md b/Content Types/Create/Add existing content type directly to SPO list/description.md
index f318e934..86ced017 100644
--- a/Content Types/Create/Add existing content type directly to SPO list/description.md
+++ b/Content Types/Create/Add existing content type directly to SPO list/description.md
@@ -2,16 +2,14 @@ A short script to add an existing site content type directly to a SharePoint Onl
-The script is fully described in an article here:
-
-http://social.technet.microsoft.com/wiki/contents/articles/31051.sharepoint-online-content-types-in-powershell.aspx
+The script is fully described in an article [here](http://social.technet.microsoft.com/wiki/contents/articles/31051.sharepoint-online-content-types-in-powershell.aspx).
### How to use?
-1. Download and install SharePoint Online SDK.
+1. Download and install [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038).
-2. Download the .ps1 file.
+2. Download the *.ps1* file.
3. Open the file (you can do it also in NotePad)
@@ -35,21 +33,23 @@ $ContentTypeID="0x01200200C44754774BD8D4449F4B7E3FE70A7E0E"
d) Enter the title of the list.
e) Enter the content type id
-###### How to find the content type id?
-* via browser
-Go to Site>Gear Icon>Site Settings>Content Types>Click on the content type. The url at this point should look like this:
-https://tenant.sharepoint.com/sites/TeamsitewithLists/_layouts/15/ManageContentType.aspx?ctype=0x0100A02B0ABDDEDC5A45AC64F100F30899CF&Source=https%3A%2F%2Ftenant%2Esharepoint%2Ecom%2Fsites%2FTeamsitewithLists%2F%5Flayouts%2F15%2Fmngctype%2Easpx
+##### *How to find the content type id?*
+* via browser
+Go to **Site**>**Gear Icon**>**Site Settings**>**Content Types**>**Click on the content type**. The url at this point should look like **[this](https://tenant.sharepoint.com/sites/TeamsitewithLists/_layouts/15/ManageContentType.aspx?ctype=0x0100A02B0ABDDEDC5A45AC64F100F30899CF&Source=https%3A%2F%2Ftenant%2Esharepoint%2Ecom%2Fsites%2FTeamsitewithLists%2F%5Flayouts%2F15%2Fmngctype%2Easpx)**.
+```diff
+https://tenant.sharepoint.com/sites/TeamsitewithLists/_layouts/15/ManageContentType.aspx?ctype=
+- 0x0100A02B0ABDDEDC5A45AC64F100F30899CF
+&Source=https%3A%2F%2Ftenant%2Esharepoint%2Ecom%2Fsites%2FTeamsitewithLists%2F%5Flayouts%2F15%2Fmngctype%2Easpx
+```
Marked in red is the content type id.
-* via another script
-Get all properties of all content types in a SharePoint site
-
+* via another script
+[Get all properties of all content types in a SharePoint site](https://gallery.technet.microsoft.com/Get-all-properties-of-all-3a9c5c4b)
5. Run the script in Powershell (any module).
-6. When the script has executed, Powershell will show a message Content Type Name of the Content Type2 has been added to Url of the Site.
+6. When the script has executed, Powershell will show a message *Content Type Name of the Content Type2 has been added to Url of the Site*.
-
Enjoy and please share feedback!
diff --git a/Content Types/Get/All Content Types from a Content Type Hub and their DisplayFormTemplate/ModifyDisplayFormTemplateName-ContentTypeHub.ps1 b/Content Types/Get/All Content Types from a Content Type Hub and their DisplayFormTemplate/ModifyDisplayFormTemplateName-ContentTypeHub.ps1
index 91519a06..c16944a8 100644
--- a/Content Types/Get/All Content Types from a Content Type Hub and their DisplayFormTemplate/ModifyDisplayFormTemplateName-ContentTypeHub.ps1
+++ b/Content Types/Get/All Content Types from a Content Type Hub and their DisplayFormTemplate/ModifyDisplayFormTemplateName-ContentTypeHub.ps1
@@ -1,16 +1,14 @@
-function Set-SPOContentType
-{
-
- param (
- [Parameter(Mandatory=$true,Position=1)]
- [string]$Username,
- [Parameter(Mandatory=$true,Position=2)]
- $AdminPassword,
- [Parameter(Mandatory=$true,Position=3)]
- [string]$Url
- )
+function Set-SPOContentType{
+param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ $AdminPassword,
+ [Parameter(Mandatory=$true,Position=3)]
+ string]$Url
+)
$ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
@@ -18,21 +16,12 @@ function Set-SPOContentType
$ctx.ExecuteQuery()
- foreach($cc in $ctx.Web.ContentTypes)
- {
-
- Write-Host $cc.Name " " $cc.DisplayFormTemplateName
-
-
-
+foreach($cc in $ctx.Web.ContentTypes){
+ Write-Host $cc.Name " " $cc.DisplayFormTemplateName
}
-
-
- $ctx.Dispose()
-
-
- }
+ $ctx.Dispose()
+}
diff --git a/Content Types/Get/Compare Web.AvailableContentTypes vs Web.ContentTypes/CompareAvVSCT.ps1 b/Content Types/Get/Compare Web.AvailableContentTypes vs Web.ContentTypes/CompareAvVSCT.ps1
index e516ffa6..17c036f1 100644
--- a/Content Types/Get/Compare Web.AvailableContentTypes vs Web.ContentTypes/CompareAvVSCT.ps1
+++ b/Content Types/Get/Compare Web.AvailableContentTypes vs Web.ContentTypes/CompareAvVSCT.ps1
@@ -1,64 +1,44 @@
-function Get-SPOContentType
-{
-
- param (
- [Parameter(Mandatory=$true,Position=1)]
+function Get-SPOContentType{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
$AdminPassword,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
[string]$Url
- )
-
- $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
- $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
- $ctx.ExecuteQuery()
-
- $ctx.Load($ctx.Web)
- $ctx.Load($ctx.Web.AvailableContentTypes)
- $ctx.ExecuteQuery()
- Write-Host
-# Write-Host $ctx.Url -BackgroundColor White -ForegroundColor DarkGreen
- $i=0
- foreach( $cc in $ctx.Web.AvailableContentTypes)
- {
-
- $i++
-
- }
- Write-Host "Available content types " $i
-
- $ctx.Load($ctx.Web.ContentTypes)
- $ctx.ExecuteQuery()
- Write-Host
- # Write-Host $ctx.Url -BackgroundColor White -ForegroundColor DarkGreen
- $i=0
- foreach( $cc in $ctx.Web.ContentTypes)
- {
-
- $i++
-
- }
- Write-Host "Content types in this site " $i
-
-
-
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
+ )
+
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
+ $ctx.ExecuteQuery()
+
+ $ctx.Load($ctx.Web)
+ $ctx.Load($ctx.Web.AvailableContentTypes)
+ $ctx.ExecuteQuery()
+ Write-Host
+ # Write-Host $ctx.Url -BackgroundColor White -ForegroundColor DarkGreen
+ $i=0
+
+ foreach( $cc in $ctx.Web.AvailableContentTypes){
+ $i++
+ }
+
+ Write-Host "Available content types " $i
+
+ $ctx.Load($ctx.Web.ContentTypes)
+ $ctx.ExecuteQuery()
+ Write-Host
+ # Write-Host $ctx.Url -BackgroundColor White -ForegroundColor DarkGreen
+ $i=0
+
+ foreach( $cc in $ctx.Web.ContentTypes){
+ $i++
+ }
+
+ Write-Host "Content types in this site " $i
+}
@@ -73,4 +53,4 @@ $AdminUrl="https://tenant.sharepoint.com/sites/teamsitewithlibraries/subsite"
-Get-SPOContentType -Username $Username -AdminPassword $AdminPassword -Url $AdminUrl
\ No newline at end of file
+Get-SPOContentType -Username $Username -AdminPassword $AdminPassword -Url $AdminUrl
diff --git a/Content Types/Get/Get All Hidden Content Types added to the site/GetSingleContentTypeLoop.ps1 b/Content Types/Get/Get All Hidden Content Types added to the site/GetSingleContentTypeLoop.ps1
index 91865e71..e9a3e086 100644
--- a/Content Types/Get/Get All Hidden Content Types added to the site/GetSingleContentTypeLoop.ps1
+++ b/Content Types/Get/Get All Hidden Content Types added to the site/GetSingleContentTypeLoop.ps1
@@ -1,48 +1,32 @@
-function Get-SPOContentType
-{
-
- param (
- [Parameter(Mandatory=$true,Position=1)]
+function Get-SPOContentType{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
$AdminPassword,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
[string]$Url
- )
-
- $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
- $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
- $ctx.ExecuteQuery()
-
- $ctx.Load($ctx.Web)
-
- $ctx.Load($ctx.Web.ContentTypes)
- $ctx.ExecuteQuery()
-
-
- foreach($cc in $ctx.Web.ContentTypes)
- {
- if($cc.Hidden -eq $true)
- {
- Write-Host $cc.Name
- }
- }
+ )
-
-
-
-
-
-
- }
-
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
+ $ctx.ExecuteQuery()
-
-
-
+ $ctx.Load($ctx.Web)
+ $ctx.Load($ctx.Web.ContentTypes)
+ $ctx.ExecuteQuery()
+
+
+ foreach($cc in $ctx.Web.ContentTypes){
+ if($cc.Hidden -eq $true){
+ Write-Host $cc.Name
+ }
+ }
+}
+
# 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"
@@ -56,4 +40,4 @@ $AdminUrl="https://tenant.sharepoint.com/sites/teamsitewithlibraries"
-Get-SPOContentType -Username $Username -AdminPassword $AdminPassword -Url $AdminUrl
\ No newline at end of file
+Get-SPOContentType -Username $Username -AdminPassword $AdminPassword -Url $AdminUrl
diff --git a/Items Management/Bulk update all items in a list/BulkUpdate.ps1 b/Items Management/Bulk update all items in a list/BulkUpdate.ps1
index 03c51214..4e963d1c 100644
--- a/Items Management/Bulk update all items in a list/BulkUpdate.ps1
+++ b/Items Management/Bulk update all items in a list/BulkUpdate.ps1
@@ -1,20 +1,18 @@
- function Update-SPOListItem
-{
-
- param (
- [Parameter(Mandatory=$true,Position=1)]
- [string]$Username,
- [Parameter(Mandatory=$true,Position=2)]
- [string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
- [string]$AdminPassword,
- [Parameter(Mandatory=$true,Position=4)]
- [string]$ListTitle,
-[Parameter(Mandatory=$true,Position=6)]
- [string]$FieldToUpdate,
-[Parameter(Mandatory=$true,Position=7)]
- [string]$ValueToUpdate
- )
+function Update-SPOListItem{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ [string]$AdminPassword,
+ [Parameter(Mandatory=$true,Position=4)]
+ [string]$ListTitle,
+ [Parameter(Mandatory=$true,Position=6)]
+ [string]$FieldToUpdate,
+ [Parameter(Mandatory=$true,Position=7)]
+ [string]$ValueToUpdate
+ )
@@ -39,30 +37,24 @@
$count=$itemki.Count
Write-Host $count
- foreach($item in $itemki)
- {
- $item[$FieldToUpdate]=$ValueToUpdate
+
+ foreach($item in $itemki){
+ $item[$FieldToUpdate]=$ValueToUpdate
$item.Update()
-
}
-
- try
- {
- $ctx.ExecuteQuery()
- write-host " Success"
+ try{
+ $ctx.ExecuteQuery()
+ write-host " Success"
}
- catch [Net.WebException]
- {
+ catch [Net.WebException]{
Write-Host $_.Exception.ToString() -ForegroundColor Red
- }
-
-
}
+}
# 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"
-Update-SPOListItem -Username user@domain.onmicrosoft.com -Url https://tenant.sharepoint.com/sites/teamsitewithlists -AdminPassword Pass -ListTitle "contacts list" -FieldToUpdate MyColumnName -ValueToUpdate SomeRandomValue
\ No newline at end of file
+Update-SPOListItem -Username user@domain.onmicrosoft.com -Url https://tenant.sharepoint.com/sites/teamsitewithlists -AdminPassword Pass -ListTitle "contacts list" -FieldToUpdate MyColumnName -ValueToUpdate SomeRandomValue
diff --git a/Items Management/Bulk update all items in a list/description.md b/Items Management/Bulk update all items in a list/description.md
index 0396d756..2671eab5 100644
--- a/Items Management/Bulk update all items in a list/description.md
+++ b/Items Management/Bulk update all items in a list/description.md
@@ -1,41 +1,16 @@
Short Powershell script to bulk update all items in a list
-
-
-
+### **Example**
-
-
-Example
-
-
-
-
-
-
Result:
+
-
-
-
-
-
+## **Requirements**
-
-
-
-Requirements
-
-
-
Before running the script, you have to modify the last lines!
-
-
-
-
```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"
@@ -45,18 +20,18 @@ Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extens
Update-SPOListItem -Username user@tenant.onmicrosoft.com -Url https://tenant.sharepoint.com/sites/teamsitewithlists -AdminPassword Pass -ListTitle "contacts list" -FieldToUpdate elp -ValueToUpdate bio
```
-Enter your credentials
-FieldToUpdate specifies the name of the list column which you want to update
-ValueToUpdate means the value that you want to enter in that column for each item
-Verify if the SharePoint Online SDK is installed in the same location on your computer
++ Enter your credentials
++ FieldToUpdate specifies the name of the list column which you want to update
++ ValueToUpdate means the value that you want to enter in that column for each item
++ 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
Related Scripts
-Powershell Module with Update-SPOListItem cmdlet
+[Powershell Module with Update-SPOListItem cmdlet](https://gallery.technet.microsoft.com/scriptcenter/Powershell-Module-for-easy-5d590623)
-Enjoy and please share feedback!
\ No newline at end of file
+Enjoy and please share feedback!
diff --git a/Items Management/Create new list item using Powershell/NewSPOListItem.psm1 b/Items Management/Create new list item using Powershell/NewSPOListItem.psm1
index 8cf76cc3..fc64496c 100644
--- a/Items Management/Create new list item using Powershell/NewSPOListItem.psm1
+++ b/Items Management/Create new list item using Powershell/NewSPOListItem.psm1
@@ -1,23 +1,22 @@
-function New-SPOListItem
-{
-param (
+function New-SPOListItem{
+ 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=$true,Position=4)]
- [string]$ListTitle,
+ [string]$ListTitle,
[Parameter(Mandatory=$true,Position=5)]
- [string]$ItemTitle,
-[Parameter(Mandatory=$false,Position=6)]
- [string]$AdditionalField="",
-[Parameter(Mandatory=$false,Position=7)]
- [string]$AdditionalValue=""
- )
-
-$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
+ [string]$ItemTitle,
+ [Parameter(Mandatory=$false,Position=6)]
+ [string]$AdditionalField="",
+ [Parameter(Mandatory=$false,Position=7)]
+ [string]$AdditionalValue=""
+ )
+
+ $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.Load($ctx.Web)
@@ -32,25 +31,21 @@ $password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
$listItem = $ll.AddItem($lici)
$listItem["Title"]=$ItemTitle
- if($AdditionalField -ne "")
- {
+
+ if($AdditionalField -ne ""){
$listItem[$AdditionalField]=$AdditionalValue
}
+
$listItem.Update()
$ll.Update()
- try
- {
-
- $ctx.ExecuteQuery()
- Write-Host "Item " $ItemTitle " has been added to list " $ListTitle
- }
- catch [Net.WebException]
- {
+ try{
+ $ctx.ExecuteQuery()
+ Write-Host "Item " $ItemTitle " has been added to list " $ListTitle
+ }
+ catch [Net.WebException]{
Write-Host $_.Exception.ToString()
- }
-
-
+ }
}
diff --git a/Items Management/Create new list item using Powershell/description.md b/Items Management/Create new list item using Powershell/description.md
index 7c09a3b6..f1a9692b 100644
--- a/Items Management/Create new list item using Powershell/description.md
+++ b/Items Management/Create new list item using Powershell/description.md
@@ -2,58 +2,47 @@ Powershell Module with one new cmdlet
-New-SPOListItem
+## **New-SPOListItem**
-
-
-Parameters
+### *Parameters*
The cmdlet is using the following parameters:
-
+```powershell
[string]$Username
+ ```
The string specifies admin of the site
-
+```powershell
[string]$Url
+```
Specifies the url of a site where you have the list
-
-[string]$AdminPassword,
+```powershell
+[string]$AdminPassword,
+```
Admin's password
-
+```powershell
[string]$ListTitle
+```
Specifies the title of the list where you want to change the settings.
-
+```powershell
[string]$ItemTitle
+```
Specifies the title of the list item. In case of a contact list it will be the LastName, task list -> task name, etc.
-
+```powershell
[string]$AdditionalField=""
+```
Optional. If you want to add some additional attribute to the item at the moment of creation. For more attributes use Update-SPOListItem. This parameter defines the internal name of the column
-
+```powershell
[string]$AdditionalValue=""
+```
Optional. If you want to add some additional attribute to the item at the moment of creation. For more attributes use Update-SPOListItem. This parameter defines the value that you want to input.
-
-
-
-
-Examples
-
-
-
-
-
-
-
-
-
-
-
-
+### *Examples*
-Requirements
+
-The following libraries (SharePoint Online SDK) are required. If those libraries are in different location on your computer, please edit the .psm1 file!
+### *Requirements*
-
+The following libraries (SharePoint Online SDK) are required. If those libraries are in different location on your computer, please edit the ```.psm1``` file!
```PowerShell
# Paths to SDK. Please verify location on your computer.
@@ -61,12 +50,6 @@ Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extens
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
```
-
-
-
-
-
-
Enjoy and please share feedback!
diff --git a/Items Management/Get the number of items in a list/GetSPOListItemCount.psm1 b/Items Management/Get the number of items in a list/GetSPOListItemCount.psm1
index 92ecf1ec..befd6e22 100644
--- a/Items Management/Get the number of items in a list/GetSPOListItemCount.psm1
+++ b/Items Management/Get the number of items in a list/GetSPOListItemCount.psm1
@@ -1,18 +1,14 @@
-function Get-SPOListItemCount
-{
-
- param (
+function Get-SPOListItemCount{
+ 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=$true,Position=3)]
- [string]$ListTitle
- )
-
-
+ [string]$ListTitle
+ )
$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
$ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
@@ -25,8 +21,6 @@
$ctx.Load($ll)
$ctx.ExecuteQuery()
-
-
$spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
$itemki=$ll.GetItems($spqQuery)
@@ -34,12 +28,9 @@
$ctx.ExecuteQuery()
$count=$itemki.Count
-
-
+
return $count
-
-
- }
+}
# Paths to SDK. Please verify location on your computer.
@@ -50,4 +41,4 @@ Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extens
-Export-ModuleMember -Function "Get-SPOListItemCount"
\ No newline at end of file
+Export-ModuleMember -Function "Get-SPOListItemCount"
diff --git a/Items Management/Get the number of items in a list/description.md b/Items Management/Get the number of items in a list/description.md
index b54e0377..c647cb03 100644
--- a/Items Management/Get the number of items in a list/description.md
+++ b/Items Management/Get the number of items in a list/description.md
@@ -1,29 +1,29 @@
New SharePoint Online Powershell cmdlet Get-SPOListItemCount which allows you to view the number of items in a list.
-
Parameters
+## *Parameters*
The cmdlet is using the following parameters:
-
- ```[string]$Username```
+```powershell
+ [string]$Username
+ ```
The string specifies admin of the site
-
-```[string]$Url```
+```powershell
+[string]$Url
+```
Specifies the url of a site where you have the list
-
-```[string]$AdminPassword```
+```powershell
+[string]$AdminPassword
+```
Admin's password
-
-```PowerShell[string]$ListTitle```
+```powershell
+PowerShell[string]$ListTitle
+```
Specifies the title of a list
-
-
-
-
-Requirements
+## *Requirements*
@@ -37,13 +37,9 @@ Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extens
-Examples
+## *Examples*
-
-
-
-
Enjoy and please share feedback!
diff --git a/Items Management/GetSpoListItems and GetSPOListFields/GetSPOListItems9.psm1 b/Items Management/GetSpoListItems and GetSPOListFields/GetSPOListItems9.psm1
index fe28d475..3af3c212 100644
--- a/Items Management/GetSpoListItems and GetSPOListFields/GetSPOListItems9.psm1
+++ b/Items Management/GetSpoListItems and GetSPOListFields/GetSPOListItems9.psm1
@@ -1,19 +1,18 @@
-function Get-SPOListFields
-{
- param (
- [Parameter(Mandatory=$true,Position=1)]
- [string]$Username,
- [Parameter(Mandatory=$true,Position=2)]
- [string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
- [string]$AdminPassword,
- [Parameter(Mandatory=$true,Position=3)]
- [string]$ListTitle,
- [Parameter(Mandatory=$false,Position=4)]
- [bool]$IncludeSubsites=$false
- )
-
-$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
+function Get-SPOListFields{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ [string]$AdminPassword,
+ [Parameter(Mandatory=$true,Position=3)]
+ [string]$ListTitle,
+ [Parameter(Mandatory=$false,Position=4)]
+ [bool]$IncludeSubsites=$false
+ )
+
+ $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.Load($ctx.Web.Lists)
@@ -26,53 +25,50 @@ $password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
$ctx.ExecuteQuery()
- $fieldsArray=@()
- $fieldslist=@()
- foreach ($fiel in $ll.Fields)
- {
- #Write-Host $fiel.Description `t $fiel.EntityPropertyName `t $fiel.Id `t $fiel.InternalName `t $fiel.StaticName `t $fiel.Tag `t $fiel.Title `t $fiel.TypeDisplayName
-
- $array=@()
- $array+="InternalName"
- $array+="StaticName"
- $array+="Tag"
- $array+="Title"
-
- $obj = New-Object PSObject
- $obj | Add-Member NoteProperty $array[0]($fiel.InternalName)
- $obj | Add-Member NoteProperty $array[1]($fiel.StaticName)
- $obj | Add-Member NoteProperty $array[2]($fiel.Tag)
- $obj | Add-Member NoteProperty $array[3]($fiel.Title)
-
- $fieldsArray+=$obj
- $fieldslist+=$fiel.InternalName
- Write-Output $obj
- }
+ $fieldsArray=@()
+ $fieldslist=@()
+
+ foreach ($fiel in $ll.Fields){
+ #Write-Host $fiel.Description `t $fiel.EntityPropertyName `t $fiel.Id `t $fiel.InternalName `t $fiel.StaticName `t $fiel.Tag `t $fiel.Title `t $fiel.TypeDisplayName
+
+ $array=@()
+ $array+="InternalName"
+ $array+="StaticName"
+ $array+="Tag"
+ $array+="Title"
+
+ $obj = New-Object PSObject
+ $obj | Add-Member NoteProperty $array[0]($fiel.InternalName)
+ $obj | Add-Member NoteProperty $array[1]($fiel.StaticName)
+ $obj | Add-Member NoteProperty $array[2]($fiel.Tag)
+ $obj | Add-Member NoteProperty $array[3]($fiel.Title)
+
+ $fieldsArray+=$obj
+ $fieldslist+=$fiel.InternalName
+ Write-Output $obj
+ }
$ctx.Dispose()
return $fieldsArray
-
}
-function Get-SPOListItems
-{
-
+function Get-SPOListItems{
param (
- [Parameter(Mandatory=$true,Position=1)]
- [string]$Username,
- [Parameter(Mandatory=$true,Position=2)]
- [string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
- [string]$AdminPassword,
- [Parameter(Mandatory=$true,Position=4)]
- [string]$ListTitle,
- [Parameter(Mandatory=$false,Position=5)]
- [bool]$IncludeAllProperties=$false,
- [switch]$Recursive
- )
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ [string]$AdminPassword,
+ [Parameter(Mandatory=$true,Position=4)]
+ [string]$ListTitle,
+ [Parameter(Mandatory=$false,Position=5)]
+ [bool]$IncludeAllProperties=$false,
+ [switch]$Recursive
+ )
@@ -91,62 +87,43 @@ function Get-SPOListItems
- $spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
-# $spqQuery.ViewAttributes = "Scope='Recursive'"
+ $spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
+ # $spqQuery.ViewAttributes = "Scope='Recursive'"
-if($Recursive)
-{
-$spqQuery.ViewXml ="";
-}
+ if($Recursive){
+ $spqQuery.ViewXml ="";
+ }
+
$bobo=Get-SPOListFields -Username $Username -Url $Url -AdminPassword $AdminPassword -ListTitle $ListTitle
-
$itemki=$ll.GetItems($spqQuery)
$ctx.Load($itemki)
$ctx.ExecuteQuery()
-
-
$objArray=@()
- for($j=0;$j -lt $itemki.Count ;$j++)
- {
-
+ for($j=0;$j -lt $itemki.Count ;$j++){
$obj = New-Object PSObject
- if($IncludeAllProperties)
- {
-
- for($k=0;$k -lt $bobo.Count ; $k++)
- {
-
+ if($IncludeAllProperties){
+ for($k=0;$k -lt $bobo.Count ; $k++){
# Write-Host $k
$name=$bobo[$k].InternalName
$value=$itemki[$j][$name]
$obj | Add-Member NoteProperty $name($value) -Force
-
}
- }
- else
- {
+ }
+ else{
$obj | Add-Member NoteProperty ID($itemki[$j]["ID"])
$obj | Add-Member NoteProperty Title($itemki[$j]["Title"])
-
- }
-
+ }
# Write-Host $obj.ID `t $obj.Title
$objArray+=$obj
-
-
}
-
-
return $objArray
-
-
- }
+}
# Paths to SDK. Please verify location on your computer.
@@ -157,4 +134,4 @@ Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extens
-Export-ModuleMember -Function "Get-SPOListItems", "Get-SPOListFields"
\ No newline at end of file
+Export-ModuleMember -Function "Get-SPOListItems", "Get-SPOListFields"
diff --git a/Items Management/GetSpoListItems and GetSPOListFields/description.md b/Items Management/GetSpoListItems and GetSPOListFields/description.md
index 945327f9..18bec11b 100644
--- a/Items Management/GetSpoListItems and GetSPOListFields/description.md
+++ b/Items Management/GetSpoListItems and GetSPOListFields/description.md
@@ -1,176 +1,125 @@
2 new SharePoint Online Powershell cmdlets to help you view items in a SharePoint Online list:
-
-
-
-
-
-Get-SPOListItems
+Get-SPOListItems
Retrieves all items in a given list
Parameters
-
-
The cmdlet is using the following parameters:
-
+```powershell
[string]$Username
+ ```
The string specifies admin of the site
-
+```powershell
[string]$Url
+```
Specifies the url of a site where you have the list
-
-[string]$AdminPassword,
+```powershell
+[string]$AdminPassword,
+```
Admin's password
-
-[string]$ListName
-ListName. To retrieve a table of list names, you can use Get-SPOList
-
+```powershell
+[string]$ListName
+```
+ListName. To retrieve a table of list names, you can use [Get-SPOList](https://gallery.technet.microsoft.com/scriptcenter/GetSPOList-Module-to-view-cc4d3e9e)
+```powershell
[bool]$IncludeAllProperties=$false
+```
Specifies whether you should view all the available properties or just the Id and Title. By the default it is set to $false.
-
-
-
-
-
-
The equivalent in Graphic User Interface (GUI) of this cmdlet would be a list view.
-
-
-Examples
+Examples
-Get all items in an announcements list
++ Get all items in an announcements list
```powershell
Get-SPOListItems -Username -Url -AdminPassword -ListName
```
+
-
-
-
-Get all items in a contacts list and their properties
++ Get all items in a contacts list and their properties
```powershell
Get-SPOListItems -Username -Url -AdminPassword -ListName -IncludeAllProperties $true (example shows only one of multiple retrieved items)
```
-
+
Get all items in a list and their properties and export to CSV
```powershell
Get-SPOListItems -Username -Url -AdminPassword -ListName -IncludeAllProperties $true | Export-CSV
```
-
-Get all contacts from a contact list that belong to a specific company
++ Get all contacts from a contact list that belong to a specific company
```powershell
Get-SPOListItems -Username trial@trialtrial123.onmicrosoft.com -Url https://trialtrial123.sharepoint.com/sites/teamsitewithlists -AdminPassword Pass -ListTitle "Contacts list" -IncludeAllProperties $true | where {$_.Company -eq "Uogiavv"} | select Title, Company
```
-
+
++ Get all properties of a document as a list item*
-
-
-Get all properties of a document as a list item*
-
-
-
-
-
-
-
+
Get a list of all documents in a document library
```powershell
Get-SPOListItems -Username trial@trialtrial123.onmicrosoft.com -Url https://trialtrial123.sharepoint.com/sites/teamsitewithlists -AdminPassword Pass -ListTitle "Documents" -IncludeAllProperties $true | select FileLeafRef
```
+
-
-
-
-
-
-Get a list of all documents in a document library, including folders and subfolders
++ Get a list of all documents in a document library, including folders and subfolders
```powershell
Get-SPOListItems -Username trial@trialtrial123.onmicrosoft.com -Url https://trialtrial123.sharepoint.com/sites/teamsitewithlists -AdminPassword Pass -ListTitle "Documents" -IncludeAllProperties $true -Recursive | select FileLeafRef
```
-
-Get a list of all Excel documents in a document library
++ Get a list of all Excel documents in a document library
```powershell
Get-SPOListItems -Username trial@trialtrial123.onmicrosoft.com -Url https://trialtrial123.sharepoint.com/sites/teamsitewithlists -AdminPassword Pass -ListTitle "Documents" -IncludeAllProperties $true | where {$_.File_x0020_Type -eq "xlsx"} |select FileLeafRef
```
-
-
-
+
-
-
-Get a list of all Excel documents in a document library and export to CSV
++ Get a list of all Excel documents in a document library and export to CSV
```powershell
Get-SPOListItems -Username trial@trialtrial123.onmicrosoft.com -Url https://trialtrial123.sharepoint.com/sites/teamsitewithlists -AdminPassword Pass -ListTitle "Documents" -IncludeAllProperties $true | where {$_.File_x0020_Type -eq "xlsx"} |select FileLeafRef | export-csv
```
-
-
-
-
-
-
-
+
-
-
-Get-SPOListFields
+## **Get-SPOListFields**
Retrieves all columns in a given list. This includes hidden columns and excluded from views.
-
-
-
-
-
-
-Parameters
+Parameters
The cmdlet is using the following parameters:
-
+```powershell
[string]$Username
+ ```
The string specifies admin of the site
-
+```powershell
[string]$Url
+```
Specifies the url of a site where you have the list
-
-[string]$AdminPassword,
+```powershell
+[string]$AdminPassword,
+```
Admin's password
+```powershell
+[string]$ListName
+```
-[string]$ListName
-
-
-
-
-Examples
+Examples
-Get all fields of a links list
++ Get all fields of a links list
```powershell
Get-SPOListFields -Username trial@trialtrial123.onmicrosoft.com -Url https://trialtrial123.sharepoint.com/sites/teamsitewithlists -AdminPassword Pass -ListTitle "Links list"
```
+
+Requirements
-
-
-
-
-
-
-Requirements
-
-
-
-The following libraries (SharePoint Online SDK) are required. If those libraries are in different location on your computer, please edit the .psm1 file!
+The following libraries (SharePoint Online SDK) are required. If those libraries are in different location on your computer, please edit the ```.psm1``` file!
```powershell
# Paths to SDK. Please verify location on your computer.
@@ -180,6 +129,6 @@ Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extens
-Technicalities
-Get-SPOListItems is using InternalName for item properties
+### **Technicalities**
+Get-SPOListItems is using InternalName for item properties
18.01.15 Added recursion and -Recursive switch parameter
diff --git a/Items Management/Module for item management/SPOListItemFunctions.psm1 b/Items Management/Module for item management/SPOListItemFunctions.psm1
index 715d157e..8e8d9ed6 100644
--- a/Items Management/Module for item management/SPOListItemFunctions.psm1
+++ b/Items Management/Module for item management/SPOListItemFunctions.psm1
@@ -1,18 +1,16 @@
-function Remove-SPOListItemInheritance
-{
-
- param (
+function Remove-SPOListItemInheritance{
+ 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=$true,Position=4)]
- [string]$ListTitle,
+ [string]$ListTitle,
[Parameter(Mandatory=$true,Position=5)]
- [Int]$ItemID
- )
+ [Int]$ItemID
+ )
@@ -29,42 +27,37 @@
$spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
-$spqQuery.ViewXml ="";
+ $spqQuery.ViewXml ="";
$itemek=$ll.GetItemByID($ItemID)
$ctx.Load($itemek)
$ctx.ExecuteQuery()
$itemek.BreakRoleInheritance($true, $false)
- try
- {
- $ctx.ExecuteQuery()
- write-host $itemek.Name " Success"
- }
- catch [Net.WebException]
- {
- Write-Host $_.Exception.ToString()
- }
-
- }
+ try{
+ $ctx.ExecuteQuery()
+ write-host $itemek.Name " Success"
+ }
+ catch [Net.WebException]{
+ Write-Host $_.Exception.ToString()
+ }
+}
- function Remove-SPOListItemPermissions
-{
-
- param (
+function Remove-SPOListItemPermissions{
+ 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=$true,Position=4)]
- [string]$ListTitle,
+ [string]$ListTitle,
[Parameter(Mandatory=$true,Position=5)]
- [Int]$ItemID
- )
+ [Int]$ItemID
+ )
@@ -81,42 +74,37 @@ $spqQuery.ViewXml ="";
$spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
-$spqQuery.ViewXml ="";
+ $spqQuery.ViewXml ="";
$itemek=$ll.GetItemByID($ItemID)
$ctx.Load($itemek)
$ctx.ExecuteQuery()
$itemek.BreakRoleInheritance($false, $false)
- try
- {
- $ctx.ExecuteQuery()
- write-host $itemek.Name " Success"
- }
-catch [Net.WebException]
- {
- Write-Host $_.Exception.ToString()
- }
-
- }
+ try{
+ $ctx.ExecuteQuery()
+ write-host $itemek.Name " Success"
+ }
+ catch [Net.WebException]{
+ Write-Host $_.Exception.ToString()
+ }
+}
- function Restore-SPOListItemInheritance
-{
-
- param (
+function Restore-SPOListItemInheritance{
+ 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=$true,Position=4)]
- [string]$ListTitle,
+ [string]$ListTitle,
[Parameter(Mandatory=$true,Position=5)]
- [Int]$ItemID
- )
+ [Int]$ItemID
+ )
@@ -133,41 +121,35 @@ catch [Net.WebException]
$spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
-$spqQuery.ViewXml ="";
+ $spqQuery.ViewXml ="";
$itemek=$ll.GetItemByID($ItemID)
$ctx.Load($itemek)
$ctx.ExecuteQuery()
$itemek.ResetRoleInheritance()
- try
- {
- $ctx.ExecuteQuery()
- write-host $itemek.Name " Success"
- }
- catch [Net.WebException]
- {
+ try{
+ $ctx.ExecuteQuery()
+ write-host $itemek.Name " Success"
+ }
+ catch [Net.WebException]{
Write-Host $_.Exception.ToString()
- }
-
-
- }
+ }
+}
- function Remove-SPOListItem
-{
-
- param (
+function Remove-SPOListItem{
+ 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=$true,Position=4)]
- [string]$ListTitle,
+ [string]$ListTitle,
[Parameter(Mandatory=$true,Position=5)]
- [Int]$ItemID
- )
+ [Int]$ItemID
+ )
@@ -184,48 +166,43 @@ $spqQuery.ViewXml ="";
$spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
-$spqQuery.ViewXml ="";
+ $spqQuery.ViewXml ="";
$itemek=$ll.GetItemByID($ItemID)
$ctx.Load($itemek)
$ctx.ExecuteQuery()
$itemek.DeleteObject()
- try
- {
- $ctx.ExecuteQuery()
- write-host $itemek.Name " Success"
- }
-catch [Net.WebException]
- {
- Write-Host $_.Exception.ToString()
- }
-
- }
+ try{
+ $ctx.ExecuteQuery()
+ write-host $itemek.Name " Success"
+ }
+ catch [Net.WebException]{
+ Write-Host $_.Exception.ToString()
+ }
+}
- function Update-SPOListItem
-{
-
- param (
+function Update-SPOListItem{
+ 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=$true,Position=4)]
- [string]$ListTitle,
+ [string]$ListTitle,
[Parameter(Mandatory=$true,Position=5)]
- [Int]$ItemID,
-[Parameter(Mandatory=$true,Position=6)]
- [string]$FieldToUpdate,
-[Parameter(Mandatory=$true,Position=7)]
- [string]$ValueToUpdate
- )
+ [Int]$ItemID,
+ [Parameter(Mandatory=$true,Position=6)]
+ [string]$FieldToUpdate,
+ [Parameter(Mandatory=$true,Position=7)]
+ [string]$ValueToUpdate
+ )
@@ -250,18 +227,15 @@ catch [Net.WebException]
$ctx.ExecuteQuery()
$itemek[$FieldToUpdate] = $ValueToUpdate
$itemek.Update()
- try
- {
- $ctx.ExecuteQuery()
- write-host $itemek.Name " Success"
- }
- catch [Net.WebException]
- {
- Write-Host $_.Exception.ToString()
- }
-
- }
+ try{
+ $ctx.ExecuteQuery()
+ write-host $itemek.Name " Success"
+ }
+ catch [Net.WebException]{
+ Write-Host $_.Exception.ToString()
+ }
+}
# 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"
diff --git a/Items Management/Module for item management/description.md b/Items Management/Module for item management/description.md
index 2c3d9a30..62713602 100644
--- a/Items Management/Module for item management/description.md
+++ b/Items Management/Module for item management/description.md
@@ -1,5 +1,5 @@
5 cmdlets for item management:
-
+
Update-SPOListItem
Remove-SPOListItem
@@ -9,254 +9,207 @@ Remove-SPOListItemPermissions
Remove-SPOListItemInheritance
Restore-SPOListItemInheritance
-
+
-Update-SPOListItem
+## **Update-SPOListItem**
Updates a property of an item
-Parameters
-
-
+### *Parameters*
The cmdlet is using the following parameters:
-
+```powershell
[string]$Username
+```
The string specifies admin of the site
-
+```powershell
[string]$Url
+```
Specifies the url of the site
-
-[string]$AdminPassword,
+```powershell
+[string]$AdminPassword,
+```
Admin's Password
-
+```powershell
[string]$ListTitle
+```
Mandatory. Specifies list title where the item is located
-
+```powershell
[Int]$ItemID
+```
Mandatory. Specifies item ID
-
+```powershell
[string]$FieldToUpdate
-Mandatory. Specifies the name of the field to update. In order to get the internal names of the fields (more often than not they are different from column titles), you can use Get-SPOListFields
-
+```
+Mandatory. Specifies the name of the field to update. In order to get the internal names of the fields (more often than not they are different from column titles), you can use [Get-SPOListFields](https://gallery.technet.microsoft.com/scriptcenter/GetSpoListItems-and-a8ecd5fa)
+```powershell
[string]$ValueToUpdate
+```
Mandatory. Specifies the value of the field for this item
-
+
-Example:
+## *Example:*
-Change the name of an item (file in this example)
-
++ Change the name of an item (file in this example)
+
-Update a column for all items using Get-SPOListItems cmdlet
-(Here we will be updating Title column to be called "Title" + the item ID number
++ Update a column for all items using [Get-SPOListItems cmdlet](https://gallery.technet.microsoft.com/scriptcenter/GetSpoListItems-and-a8ecd5fa)
+(Here we will be updating Title column to be called "Title" + the item ID number
+
And the result:
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Remove-SPOListItem
+## **Remove-SPOListItem**
Removes an item
-
-
-Parameters
-
-
+### *Parameters*
The cmdlet is using the following parameters:
-
+```powershell
[string]$Username
+ ```
The string specifies admin of the site
-
+```powershell
[string]$Url
+```
Specifies the url of the site
-
-[string]$AdminPassword,
+```powershell
+[string]$AdminPassword,
+```
Admin's Password
-
+```powershell
[string]$ListTitle
+```
Mandatory. Specifies list title where the item is located
-
+```powershell
[Int]$ItemID
+```
Mandatory. Specifies item ID
-
-
-Example:
-
-
-
-Remove the item no 16 located in one of the subfolders
-
-
-
-
-
+## *Example:*
-
-
-
-
-
-
-
-
++ Remove the item no 16 located in one of the subfolders
-
+
-Remove-SPOListItemPermissions
+## **Remove-SPOListItemPermissions**
Removes all permissions for an item. Only the user running the cmdlet will have access
-
-
-Parameters
-
-
+### *Parameters*
The cmdlet is using the following parameters:
-
+```powershell
[string]$Username
+ ```
The string specifies admin of the site
-
+```powershell
[string]$Url
+```
Specifies the url of the site
-
-[string]$AdminPassword,
+```powershell
+[string]$AdminPassword,
+```
Admin's Password
-
+```powershell
[string]$ListTitle
+```
Mandatory. Specifies list title where the item is located
-
+```powershell
[Int]$ItemID
+```
Mandatory. Specifies item ID
-Example:
+## *Example:*
-Remove the permissions
-Remove-SPOListItemPermissions -Username trial@trialtrial123.onmicrosoft.com -Url https://trialtrial123.sharepoint.com -AdminPassword Pass -ListTitle chc1 -ItemID 4
++ Remove the permissions
-
-
-
-
-
-
-
+Remove-SPOListItemPermissions -Username trial@trialtrial123.onmicrosoft.com -Url https://trialtrial123.sharepoint.com -AdminPassword Pass -ListTitle chc1 -ItemID 4
-
+
-
+
-Remove-SPOListItemInheritance
+## **Remove-SPOListItemInheritance**
Stops inheriting permissions for an item
-
-
-Parameters
-
-
+### *Parameters*
The cmdlet is using the following parameters:
-
+```powershell
[string]$Username
+ ```
The string specifies admin of the site
-
+```powershell
[string]$Url
+```
Specifies the url of the site
-
-[string]$AdminPassword,
+```powershell
+[string]$AdminPassword,
+```
Admin's Password
-
+```powershell
[string]$ListTitle
+```
Mandatory. Specifies list title where the item is located
-
+```powershell
[Int]$ItemID
+```
Mandatory. Specifies item ID
-
+
-
-
-
-
-Restore-SPOListItemInheritance
+## **Restore-SPOListItemInheritance**
Deletes unique permissions for an item
-
-
-Parameters
+### *Parameters*
The cmdlet is using the following parameters:
-
+```powershell
[string]$Username
+ ```
The string specifies admin of the site
-
+```powershell
[string]$Url
+```
Specifies the url of the site
-
+```powershell
[string]$AdminPassword,
+```
Admin's Password
-
+```powershell
[string]$ListTitle
+```
Mandatory. Specifies list title where the item is located
-
+```powershell
[Int]$ItemID
+```
Mandatory. Specifies item ID
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Requirements
+## *Requirements*
diff --git a/Items Management/Remove permissions from SharePoint Online items/RemovePermissionsFromItems.ps1 b/Items Management/Remove permissions from SharePoint Online items/RemovePermissionsFromItems.ps1
index 459fc801..c2b6cb0e 100644
--- a/Items Management/Remove permissions from SharePoint Online items/RemovePermissionsFromItems.ps1
+++ b/Items Management/Remove permissions from SharePoint Online items/RemovePermissionsFromItems.ps1
@@ -1,17 +1,15 @@
<#Powershell script to remove permissions for all items in a SharePoint Online list. As a result, only the user running this script will have access to the files. Before you run it, you have to modify the last line of the script! #>
-function Remove-SPOListAllItemsInheritance
-{
-
- param (
+function Remove-SPOListAllItemsInheritance{
+ 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=$true,Position=4)]
- [string]$ListTitle
- )
+ [string]$ListTitle
+ )
@@ -36,15 +34,13 @@ function Remove-SPOListAllItemsInheritance
$ctx.ExecuteQuery()
- for($j=0;$j -lt $itemki.Count ;$j++)
- {
+ for($j=0;$j -lt $itemki.Count ;$j++){
$itemki[$j].BreakRoleInheritance($false, $false)
}
-
$ctx.ExecuteQuery()
- }
+}
# Paths to SDK. Please verify location on your computer.
diff --git a/Items Management/Remove permissions from SharePoint Online items/description.md b/Items Management/Remove permissions from SharePoint Online items/description.md
index 3a7cd73c..42166af2 100644
--- a/Items Management/Remove permissions from SharePoint Online items/description.md
+++ b/Items Management/Remove permissions from SharePoint Online items/description.md
@@ -2,31 +2,15 @@ Powershell script to remove permissions for all items in a SharePoint Online lis
As a result, only the user running this script will have access to the files.
-
-
-
-
-Result
-
-
-
-
-
-
+### *Result*
-
+
-
-
-
+
-Requirements
+### *Requirements*
-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.
@@ -36,11 +20,11 @@ Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extens
Remove-SPOListAllItemsInheritance -Username "trial@trialtrial123.onmicrosoft.com" -Url "https://trialtrial123.sharepoint.com" -AdminPassword "Pass" -ListTitle "chc1"
```
-Enter your credentials and the site where you want to modify the inheritance.
-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.
++ Verify if the [SharePoint Online SDK](http://www.microsoft.com/en-us/download/details.aspx?id=30722) is installed in the same location on your computer
-Enjoy and please share feedback!s
\ No newline at end of file
+Enjoy and please share feedback!s
diff --git a/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/Capture7.PNG b/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/Capture7.PNG
new file mode 100644
index 00000000..4e9807f5
Binary files /dev/null and b/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/Capture7.PNG differ
diff --git a/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/FindCheckedOutFilesandCheckThemInSPServer.ps1 b/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/FindCheckedOutFilesandCheckThemInSPServer.ps1
new file mode 100644
index 00000000..25eb11de
--- /dev/null
+++ b/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/FindCheckedOutFilesandCheckThemInSPServer.ps1
@@ -0,0 +1,100 @@
+function Get-SPOFolderFiles
+{
+param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ $password,
+ [Parameter(Mandatory=$true,Position=4)]
+ [string]$ListTitle
+ )
+
+# Create context and test the connection
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object System.Net.NetworkCredential($Username, $password)
+ $ctx.Load($ctx.Web)
+ $ctx.ExecuteQuery()
+
+
+ $ll=$ctx.Web.Lists.GetByTitle($ListTitle)
+ $ctx.Load($ll)
+ $ctx.ExecuteQuery()
+ $spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
+ $spqQuery.ViewXml ="";
+ $itemki=$ll.GetItems($spqQuery)
+ $ctx.Load($itemki)
+ $ctx.ExecuteQuery()
+
+ foreach($item in $itemki)
+ {
+
+ Write-Host $item["FileRef"] $item.ElementType
+
+ $file =
+ $ctx.Web.GetFileByServerRelativeUrl($item["FileRef"]);
+ $ctx.Load($file)
+ $ctx.Load($file.Versions)
+
+ $ctx.Load($file.ListItemAllFields)
+ $Author=$file.Author
+ $CheckedOutByUser=$file.CheckedOutByUser
+ $LockedByUser=$file.LockedByUser
+ $ModifiedBy=$file.ModifiedBy
+ $ctx.Load($Author)
+ $ctx.Load($CheckedOutByUser)
+ $ctx.Load($LockedByUser)
+ $ctx.Load($ModifiedBy)
+ $ctx.Load($file.EffectiveInformationRightsManagementSettings)
+ $ctx.Load($file.Properties)
+ try
+ {
+ $ctx.ExecuteQuery()
+ }
+ catch
+ {}
+
+ if($CheckedOutByUser.LoginName -ne $null){
+ Write-Host $file.Name
+ Write-Host $CheckedOutByUser.LoginName
+ $file.CheckIn('Checked in automatically', 'MajorCheckIn')
+ $ctx.Load($file)
+ try
+ {
+ $ctx.ExecuteQuery()
+ Write-Host $file.Name " has been checked in" -ForegroundColor DarkGreen
+ }
+ catch [Net.WebException]
+ {
+ Write-Host $_.Exception.ToString()
+ }
+
+ }
+
+
+
+ }
+ }
+
+
+
+
+
+
+
+
+
+#Paths to SDK
+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"
+
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="AwesomeMachine\administrator"
+$Url="http://ThisIsSharePoint/sites/site1"
+$ListTitle="Documents"
+
+
+
+Get-sPOFolderFiles -Username $username -Url $Url -password $AdminPassword -ListTitle $ListTitle
\ No newline at end of file
diff --git a/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/description.md b/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/description.md
new file mode 100644
index 00000000..c6d6dd02
--- /dev/null
+++ b/Lists and Libraries Management/Checkout/Powershell/Find all checked out files in SharePoint library and check them in/description.md
@@ -0,0 +1,46 @@
+The script requires SharePoint Online SDK.
+
+
+
+What does it do?
+
+The script finds all the checked out files in a single library and checks them in.
+
+
+
+How to use?
+
+1. Download and open the file.
+
+2. Refer the paths to the SDK:
+
+
+
+PowerShell
+#Paths to SDK
+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"
+
+
+3. Enter your credentials, the url of the site and the name of the list
+
+PowerShell
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="AwesomeMachine\administrator"
+$Url="http://ThisIsSharePoint/sites/site1"
+$ListTitle="Documents"
+
+4. Save the file, close, and run the script in Powershell.
+
+
+
+The files will have the following check-in in their version history:
+
+
+
+If you want to change the comment's content, modify the following line in the script:
+
+PowerShell
+$file.CheckIn('Checked in automatically', 'MajorCheckIn')
+
diff --git a/Lists and Libraries Management/Checkout/Powershell/SPServer/Find all checked out files in SharePoint library and check them in/Capture7.PNG b/Lists and Libraries Management/Checkout/Powershell/SPServer/Find all checked out files in SharePoint library and check them in/Capture7.PNG
new file mode 100644
index 00000000..4e9807f5
Binary files /dev/null and b/Lists and Libraries Management/Checkout/Powershell/SPServer/Find all checked out files in SharePoint library and check them in/Capture7.PNG differ
diff --git a/Lists and Libraries Management/Checkout/Powershell/SPServer/Find all checked out files in SharePoint library and check them in/FindCheckedOutFilesandCheckThemInSPServer.ps1 b/Lists and Libraries Management/Checkout/Powershell/SPServer/Find all checked out files in SharePoint library and check them in/FindCheckedOutFilesandCheckThemInSPServer.ps1
new file mode 100644
index 00000000..25eb11de
--- /dev/null
+++ b/Lists and Libraries Management/Checkout/Powershell/SPServer/Find all checked out files in SharePoint library and check them in/FindCheckedOutFilesandCheckThemInSPServer.ps1
@@ -0,0 +1,100 @@
+function Get-SPOFolderFiles
+{
+param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ $password,
+ [Parameter(Mandatory=$true,Position=4)]
+ [string]$ListTitle
+ )
+
+# Create context and test the connection
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object System.Net.NetworkCredential($Username, $password)
+ $ctx.Load($ctx.Web)
+ $ctx.ExecuteQuery()
+
+
+ $ll=$ctx.Web.Lists.GetByTitle($ListTitle)
+ $ctx.Load($ll)
+ $ctx.ExecuteQuery()
+ $spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery
+ $spqQuery.ViewXml ="";
+ $itemki=$ll.GetItems($spqQuery)
+ $ctx.Load($itemki)
+ $ctx.ExecuteQuery()
+
+ foreach($item in $itemki)
+ {
+
+ Write-Host $item["FileRef"] $item.ElementType
+
+ $file =
+ $ctx.Web.GetFileByServerRelativeUrl($item["FileRef"]);
+ $ctx.Load($file)
+ $ctx.Load($file.Versions)
+
+ $ctx.Load($file.ListItemAllFields)
+ $Author=$file.Author
+ $CheckedOutByUser=$file.CheckedOutByUser
+ $LockedByUser=$file.LockedByUser
+ $ModifiedBy=$file.ModifiedBy
+ $ctx.Load($Author)
+ $ctx.Load($CheckedOutByUser)
+ $ctx.Load($LockedByUser)
+ $ctx.Load($ModifiedBy)
+ $ctx.Load($file.EffectiveInformationRightsManagementSettings)
+ $ctx.Load($file.Properties)
+ try
+ {
+ $ctx.ExecuteQuery()
+ }
+ catch
+ {}
+
+ if($CheckedOutByUser.LoginName -ne $null){
+ Write-Host $file.Name
+ Write-Host $CheckedOutByUser.LoginName
+ $file.CheckIn('Checked in automatically', 'MajorCheckIn')
+ $ctx.Load($file)
+ try
+ {
+ $ctx.ExecuteQuery()
+ Write-Host $file.Name " has been checked in" -ForegroundColor DarkGreen
+ }
+ catch [Net.WebException]
+ {
+ Write-Host $_.Exception.ToString()
+ }
+
+ }
+
+
+
+ }
+ }
+
+
+
+
+
+
+
+
+
+#Paths to SDK
+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"
+
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="AwesomeMachine\administrator"
+$Url="http://ThisIsSharePoint/sites/site1"
+$ListTitle="Documents"
+
+
+
+Get-sPOFolderFiles -Username $username -Url $Url -password $AdminPassword -ListTitle $ListTitle
\ No newline at end of file
diff --git a/Lists and Libraries Management/Checkout/Powershell/SPServer/Find all checked out files in SharePoint library and check them in/description.md b/Lists and Libraries Management/Checkout/Powershell/SPServer/Find all checked out files in SharePoint library and check them in/description.md
new file mode 100644
index 00000000..c6d6dd02
--- /dev/null
+++ b/Lists and Libraries Management/Checkout/Powershell/SPServer/Find all checked out files in SharePoint library and check them in/description.md
@@ -0,0 +1,46 @@
+The script requires SharePoint Online SDK.
+
+
+
+What does it do?
+
+The script finds all the checked out files in a single library and checks them in.
+
+
+
+How to use?
+
+1. Download and open the file.
+
+2. Refer the paths to the SDK:
+
+
+
+PowerShell
+#Paths to SDK
+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"
+
+
+3. Enter your credentials, the url of the site and the name of the list
+
+PowerShell
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="AwesomeMachine\administrator"
+$Url="http://ThisIsSharePoint/sites/site1"
+$ListTitle="Documents"
+
+4. Save the file, close, and run the script in Powershell.
+
+
+
+The files will have the following check-in in their version history:
+
+
+
+If you want to change the comment's content, modify the following line in the script:
+
+PowerShell
+$file.CheckIn('Checked in automatically', 'MajorCheckIn')
+
diff --git a/Lists and Libraries Management/Versioning/Get versioning settings for all lists/Capture431.PNG b/Lists and Libraries Management/Versioning/Get versioning settings for all lists/Capture431.PNG
new file mode 100644
index 00000000..41f0400d
Binary files /dev/null and b/Lists and Libraries Management/Versioning/Get versioning settings for all lists/Capture431.PNG differ
diff --git a/Lists and Libraries Management/Versioning/Get versioning settings for all lists/GetVersioningSettings.ps1 b/Lists and Libraries Management/Versioning/Get versioning settings for all lists/GetVersioningSettings.ps1
new file mode 100644
index 00000000..9210a2d5
--- /dev/null
+++ b/Lists and Libraries Management/Versioning/Get versioning settings for all lists/GetVersioningSettings.ps1
@@ -0,0 +1,78 @@
+function getall($urelek)
+{
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($urelek)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
+ $ctx.Load($ctx.Web.Lists)
+ $ctx.Load($ctx.Web)
+ $ctx.Load($ctx.Web.Webs)
+ $ctx.ExecuteQuery()
+ Write-Host
+ Write-Host $ctx.Url -BackgroundColor White -ForegroundColor DarkGreen
+ foreach( $list in $ctx.Web.Lists)
+ {
+ $ctx.Load($list)
+
+ try
+ {
+ $ctx.ExecuteQuery()
+ $VersioningDetails = New-Object PSObject -Property @{
+ 'List' = $list.Title
+ 'Url'= $list.ParentWebUrl
+ 'Require Content Approval' = $list.EnableModeration
+ 'Versioning Enabled' = $list.EnableVersioning
+ 'Major Version limit' = $list.MajorVersionLimit
+ 'Draft Version limit' = $list.MajorWithMinorVersionsLimit
+ 'Drafts visible to' = $list.DraftVersionVisibility
+ 'Checkout required' = $list.ForceCheckout
+ }
+ Write-Host $list.Title -ForegroundColor DarkGreen
+
+ $Global:csv+= $VersioningDetails
+ }
+
+ catch
+ {
+ #$Global:csv+= $csvvalue
+ Write-Host $list.Title -ForegroundColor Red
+ }
+
+
+
+ }
+
+ if($ctx.Web.Webs.Count -gt 0)
+ {
+ for($i=0; $i -lt $ctx.Web.Webs.Count ; $i++)
+ {
+ getall($ctx.Web.Webs[$i].Url)
+ }
+
+ }
+
+
+
+}
+
+# Paths to SDK. Please verify location on your computer.
+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"
+
+
+
+# You can also enter credentials directly: $siteUrl="https://tenant-admin.sharepoint.com"
+$siteUrl = Read-Host -Prompt "Enter https://tenant-admin.sharepoint.com”
+$username = Read-Host -Prompt "Enter admin's login, e.g. admin@domain.onmicrosoft.com"
+$password = Read-Host -Prompt "Enter password" -AsSecureString
+$credy= New-Object System.Management.Automation.PSCredential($username,$password)
+Connect-SPOService -Credential $credy -Url $siteUrl
+
+$sitecollections=get-SPOSite
+$Global:csv=@()
+
+foreach($sitecoll in $sitecollections)
+{
+ getall($sitecoll.Url)
+}
+
+# Specify the path where the log file will be published
+$Global:csv | Export-Csv -Path C:\Users\Public\Versioning5.csv
diff --git a/Lists and Libraries Management/Versioning/Get versioning settings for all lists/description.md b/Lists and Libraries Management/Versioning/Get versioning settings for all lists/description.md
new file mode 100644
index 00000000..8ac15997
--- /dev/null
+++ b/Lists and Libraries Management/Versioning/Get versioning settings for all lists/description.md
@@ -0,0 +1,32 @@
+A short script that checks versioning settings for all the libraries and lists in the whole tenant.
+
+
+
+It requires SharePoint Online Management Shell and SharePoint SDK installed.
+
+
+
+It uses recurrence to find all sites in all site collections and then goes through all the lists.
+
+At the end, a csv file is generated with the lists' urls and settings:
+
+
+
+
+
+As the script runs you will see green lists' titles for which the setting was successfully retrieved and red for those which failed.
+
+
+
+
+
+### How to use?
+Download and open the .ps1 file.
+Add correct SharePoint Online SDK libraries:
+
+
+```PowerShell
+# Paths to SDK. Please verify location on your computer.
+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"
+
diff --git a/OneDrive for Business/Add BCC to all sharing invitations in OneDrive for Business/BccExternalSharingInvitations.ps1 b/OneDrive for Business/Add BCC to all sharing invitations in OneDrive for Business/BccExternalSharingInvitations.ps1
new file mode 100644
index 00000000..c143e6dd
--- /dev/null
+++ b/OneDrive for Business/Add BCC to all sharing invitations in OneDrive for Business/BccExternalSharingInvitations.ps1
@@ -0,0 +1,35 @@
+function Set-SPOTenant{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ $password
+ )
+
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
+ $ctx.Load($ctx.Web)
+ $ctx.ExecuteQuery()
+
+ $spoTenant= New-Object Microsoft.Online.SharePoint.TenantAdministration.Tenant($Ctx)
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+ $spoTenant.BccExternalSharingInvitations=$true
+ $spoTenant.BccExternalSharingInvitationsList={arleta.wanat@SomeFakeAdresse.com}
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+ Write-Output $spoTenant
+}
+
+#Paths to SDK
+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\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.Online.SharePoint.Client.Tenant.dll"
+
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="admin@TENANT.onmicrosoft.com"
+$Url="https://TENANT-admin.sharepoint.com"
+
+Set-SPOTenant -Username $username -Url $Url -password $AdminPassword
diff --git a/OneDrive for Business/Add BCC to all sharing invitations in OneDrive for Business/Untitled099.png b/OneDrive for Business/Add BCC to all sharing invitations in OneDrive for Business/Untitled099.png
new file mode 100644
index 00000000..3df79a6f
Binary files /dev/null and b/OneDrive for Business/Add BCC to all sharing invitations in OneDrive for Business/Untitled099.png differ
diff --git a/OneDrive for Business/Add BCC to all sharing invitations in OneDrive for Business/description.md b/OneDrive for Business/Add BCC to all sharing invitations in OneDrive for Business/description.md
new file mode 100644
index 00000000..a4152221
--- /dev/null
+++ b/OneDrive for Business/Add BCC to all sharing invitations in OneDrive for Business/description.md
@@ -0,0 +1,29 @@
+Short Powershell script to send bcc copies to all sharing invitations send from users' OneDrives for Business. The script uses CSOM with December 2015 update.
+
+## How to use?
+
+- Download and open the .ps1 file.
+- Add correct SharePoint Online SDK libraries:
+
+
+```PowerShell
+#Paths to SDK
+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\SharePoint Client Components\16.0\Assemblies\Microsoft.Online.SharePoint.Client.Tenant.dll"
+```
+- Enter the correct url, and admin login. Under InvitationsList, enter the email addresses that you want to add in BCC to every sharing invitation in your users' OneDrive for Business. You will be additionally prompted for the password. Do not enter it in the file:
+```PowerShell
+ $spoTenant.BccExternalSharingInvitationsList={arleta.wanat@SomeFakeAdresse.com}
+
+
+
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="admin@TENANT.onmicrosoft.com"
+$Url="https://TENANT-admin.sharepoint.com"
+ ```
+- Run the script
+
+After the setting takes place, the BCC emails will start receiving copies of the sharing invitations with Invited person's email in the "TO" field and inviter's in "CC":
+
+
diff --git a/OneDrive for Business/Globally set OneDrive for Business Access Requests and Members Can Share/ODBAccessRequests.PNG b/OneDrive for Business/Globally set OneDrive for Business Access Requests and Members Can Share/ODBAccessRequests.PNG
new file mode 100644
index 00000000..7f7ba526
Binary files /dev/null and b/OneDrive for Business/Globally set OneDrive for Business Access Requests and Members Can Share/ODBAccessRequests.PNG differ
diff --git a/OneDrive for Business/Globally set OneDrive for Business Access Requests and Members Can Share/ODBAccessRequests.ps1 b/OneDrive for Business/Globally set OneDrive for Business Access Requests and Members Can Share/ODBAccessRequests.ps1
new file mode 100644
index 00000000..70a663da
--- /dev/null
+++ b/OneDrive for Business/Globally set OneDrive for Business Access Requests and Members Can Share/ODBAccessRequests.ps1
@@ -0,0 +1,54 @@
+function Set-SiteColl
+{
+param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ $password,
+ [Parameter(Mandatory=$true)]
+ $ODBMembersCanShare,
+ [Parameter(Mandatory=$true)]
+ $ODBAccessRequests
+ )
+
+
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
+ $ctx.Load($ctx.Web)
+ $ctx.ExecuteQuery()
+
+ $spoTenant= New-Object Microsoft.Online.SharePoint.TenantAdministration.Tenant($Ctx)
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+ $spoTenant.ODBAccessRequests =[Microsoft.SharePoint.Client.SharingState]::$ODBAccessRequests
+ $spoTenant.ODBMembersCanShare=[Microsoft.SharePoint.Client.SharingState]::$ODBMembersCanShare
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+ Write-Output $spoTenant
+
+}
+
+
+
+
+#Paths to SDK
+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\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.Online.SharePoint.Client.Tenant.dll"
+
+
+
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="admin@TENANT.onmicrosoft.com"
+$Url="https://TENANT-admin.sharepoint.com"
+$ODBMembersCanShare="On" # On, Off, Unspecified
+$ODBAccessRequests="Unspecified" #On, Off, Unspecified
+
+
+
+
+
+
+Set-SiteColl -Username $username -Url $Url -password $AdminPassword -ODBMembersCanShare $ODBMembersCanShare -ODBAccessRequests $ODBAccessRequests
\ No newline at end of file
diff --git a/OneDrive for Business/Globally set OneDrive for Business Access Requests and Members Can Share/description.md b/OneDrive for Business/Globally set OneDrive for Business Access Requests and Members Can Share/description.md
new file mode 100644
index 00000000..7a13599f
--- /dev/null
+++ b/OneDrive for Business/Globally set OneDrive for Business Access Requests and Members Can Share/description.md
@@ -0,0 +1,44 @@
+Short Powershell script that modifies the following settings on every user's OneDrive for Business:
+
+
+
+
+
+On- Users with edit permissions can re-share.
+
+Off- Only OneDrive for Business owner can share. The value of ODBAccessRequestsdefines whether a request to share gets sent to the owner.
+
+Unspecified- Let each OneDrive for Business owner enable or disable re-sharing behavior on their OneDrive.
+
+
+
+
+
+The script is part of Technet Wiki article OneDrive for Business sharing settings with Powershell.
+
+## How to use?
+Download and open the .ps1 file.
+Add correct SharePoint Online SDK libraries:
+
+
+```PowerShell
+#Paths to SDK
+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\SharePoint Client Components\16.0\Assemblies\Microsoft.Online.SharePoint.Client.Tenant.dll"
+``` Enter the correct url, the setting for the sync button, and admin login. You will be additionally prompted for the password. Do not enter it in the file:
+```PowerShell
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="admin@TENANT.onmicrosoft.com"
+$Url="https://TENANT-admin.sharepoint.com"
+$ODBMembersCanShare="On" # On, Off, Unspecified
+$ODBAccessRequests="Unspecified" #On, Off, Unspecified
+```
+
+
+ Run the script
+
+
+
+
+
diff --git a/OneDrive for Business/Hide OneDrive for Business Sync button using PS and CSOM/HideSyncButtonOnODB.ps1 b/OneDrive for Business/Hide OneDrive for Business Sync button using PS and CSOM/HideSyncButtonOnODB.ps1
new file mode 100644
index 00000000..6e40036d
--- /dev/null
+++ b/OneDrive for Business/Hide OneDrive for Business Sync button using PS and CSOM/HideSyncButtonOnODB.ps1
@@ -0,0 +1,37 @@
+function Set-SPOTenant{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ $password,
+ [Parameter(Mandatory=$true,Position=4)]
+ [Bool]$HideSyncButtonOnODB
+ )
+
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
+ $ctx.Load($ctx.Web)
+ $ctx.ExecuteQuery()
+
+ $spoTenant= New-Object Microsoft.Online.SharePoint.TenantAdministration.Tenant($Ctx)
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+ $spoTenant.HideSyncButtonOnODB=$HideSyncButtonOnODB
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+ Write-Output $spoTenant
+}
+
+#Paths to SDK
+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\SharePoint Client Components\16.0\Assemblies\Microsoft.Online.SharePoint.Client.Tenant.dll"
+
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="arleta@TENANT.onmicrosoft.com"
+$Url="https://TENANT-admin.sharepoint.com"
+$HideSyncButtonOnODB=$true #Whether the sync button should be hidden
+
+Set-SPOTenant -Username $username -Url $Url -password $AdminPassword -HideSyncButtonOnODB $HideSyncButtonOnODB
diff --git a/OneDrive for Business/Hide OneDrive for Business Sync button using PS and CSOM/ODBAccessRequests.222ENG.PNG b/OneDrive for Business/Hide OneDrive for Business Sync button using PS and CSOM/ODBAccessRequests.222ENG.PNG
new file mode 100644
index 00000000..db2067de
Binary files /dev/null and b/OneDrive for Business/Hide OneDrive for Business Sync button using PS and CSOM/ODBAccessRequests.222ENG.PNG differ
diff --git a/OneDrive for Business/Hide OneDrive for Business Sync button using PS and CSOM/description.md b/OneDrive for Business/Hide OneDrive for Business Sync button using PS and CSOM/description.md
new file mode 100644
index 00000000..d2189e8a
--- /dev/null
+++ b/OneDrive for Business/Hide OneDrive for Business Sync button using PS and CSOM/description.md
@@ -0,0 +1,34 @@
+Short Powershell script that hides Sync button in OneDrive for Business for all users.
+
+
+
+The script uses CSOM and requires SharePoint Online SDK.
+
+
+
+This button will be removed with the script:
+
+
+
+### How to use?
+- Download and open the ```.ps1``` file.
+- Add correct SharePoint Online SDK libraries:
+
+```PowerShell
+#Paths to SDK
+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\SharePoint Client Components\16.0\Assemblies\Microsoft.Online.SharePoint.Client.Tenant.dll"
+```
+
+- Enter the correct url, the setting for the sync button, and admin login. You will be additionally prompted for the password. Do not enter it in the file:
+
+```PowerShell
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="arleta@TENANT.onmicrosoft.com"
+$Url="https://TENANT-admin.sharepoint.com"
+$HideSyncButtonOnODB=$true #Whether the sync button should be hidden
+```
+
+- Run the script
+
diff --git a/OneDrive for Business/Notify OneDrive for Business owner if anonymous link to their content is created/OwnerAnonymousNotification.ps1 b/OneDrive for Business/Notify OneDrive for Business owner if anonymous link to their content is created/OwnerAnonymousNotification.ps1
new file mode 100644
index 00000000..23282e52
--- /dev/null
+++ b/OneDrive for Business/Notify OneDrive for Business owner if anonymous link to their content is created/OwnerAnonymousNotification.ps1
@@ -0,0 +1,38 @@
+function Set-SPOTenant{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ $password,
+ [Parameter(Mandatory=$true,Position=4)]
+ [Bool]$OwnerAnonymousNotification
+ )
+
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
+ $ctx.Load($ctx.Web)
+ $ctx.ExecuteQuery()
+
+ $spoTenant= New-Object Microsoft.Online.SharePoint.TenantAdministration.Tenant($Ctx)
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+ $spoTenant.NotificationsInOneDriveForBusinessEnabled =$true
+ $spoTenant.OwnerAnonymousNotification=$OwnerAnonymousNotification
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+ Write-Output $spoTenant
+}
+
+#Paths to SDK
+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\SharePoint Client Components\16.0\Assemblies\Microsoft.Online.SharePoint.Client.Tenant.dll"
+
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="admin@TENANT.onmicrosoft.com"
+$Url="https://TENANT-admin.sharepoint.com"
+$OwnerAnonymousNotification=$true #Whether ODB owner should be notified when anonymous link is created or changed
+
+Set-SPOTenant -Username $username -Url $Url -password $AdminPassword -OwnerAnonymousNotification $OwnerAnonymousNotification
diff --git a/OneDrive for Business/Notify OneDrive for Business owner if anonymous link to their content is created/description.md b/OneDrive for Business/Notify OneDrive for Business owner if anonymous link to their content is created/description.md
new file mode 100644
index 00000000..09e4549a
--- /dev/null
+++ b/OneDrive for Business/Notify OneDrive for Business owner if anonymous link to their content is created/description.md
@@ -0,0 +1,28 @@
+Short Powershell script that enables or disables a setting to send emails to OneDrive for Business owners when someone creates an anonymous link to the ODB owner's content.
+
+It uses CSOm and requires SharePoint Online SDK. The script is part of and more explained in a Technet Wiki article:
+[OneDrive for Business notification settings with Powershell](https://social.technet.microsoft.com/wiki/contents/articles/39385.onedrive-for-business-notifications-with-powershell.aspx)
+
+
+## How to use?
+
+- Download and open the .ps1 file.
+- Add correct libraries:
+
+```PowerShell
+#Paths to SDK
+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\SharePoint Client Components\16.0\Assemblies\Microsoft.Online.SharePoint.Client.Tenant.dll"
+```
+
+- Enter the correct url and admin login:
+
+```PowerShell
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="admin@TENANT.onmicrosoft.com"
+$Url="https://TENANT-admin.sharepoint.com"
+$OwnerAnonymousNotification=$true #Whether ODB owner should be notified when anonymous link is created or changed
+ ```
+
+- Run the script
diff --git a/OneDrive for Business/Notify OneDrive for Business owner if their content is reshared/NotifyOwnersWhenItemsReshared.ps1 b/OneDrive for Business/Notify OneDrive for Business owner if their content is reshared/NotifyOwnersWhenItemsReshared.ps1
new file mode 100644
index 00000000..7bf757ae
--- /dev/null
+++ b/OneDrive for Business/Notify OneDrive for Business owner if their content is reshared/NotifyOwnersWhenItemsReshared.ps1
@@ -0,0 +1,37 @@
+function Set-SPOTenant{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ $password,
+ [Parameter(Mandatory=$true,Position=4)]
+ [Bool]$NotifyOwnersWhenItemsReshared
+ )
+
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
+ $ctx.Load($ctx.Web)
+ $ctx.ExecuteQuery()
+
+ $spoTenant= New-Object Microsoft.Online.SharePoint.TenantAdministration.Tenant($Ctx)
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+ $spoTenant.NotifyOwnersWhenItemsReshared=$NotifyOwnersWhenItemsReshared
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+ Write-Output $spoTenant
+}
+
+#Paths to SDK
+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\SharePoint Client Components\16.0\Assemblies\Microsoft.Online.SharePoint.Client.Tenant.dll"
+
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="admin@TENANT.onmicrosoft.com"
+$Url="https://TENANT-admin.sharepoint.com"
+$NotifyOwnersWhenItemsReshared=$true #Whether ODB owner should be notified the content is reshared with external users
+
+Set-SPOTenant -Username $username -Url $Url -password $AdminPassword -NotifyOwnersWhenItemsReshared $NotifyOwnersWhenItemsReshared
diff --git a/OneDrive for Business/Notify OneDrive for Business owner if their content is reshared/description.md b/OneDrive for Business/Notify OneDrive for Business owner if their content is reshared/description.md
new file mode 100644
index 00000000..6026aa94
--- /dev/null
+++ b/OneDrive for Business/Notify OneDrive for Business owner if their content is reshared/description.md
@@ -0,0 +1,28 @@
+Short Powershell script that enables or disables a setting to send emails to OneDrive for Business owners when someone further shares the ODB owner's content with external users.
+
+It uses CSOM and requires SharePoint Online SDK. The script is part of and more explained in a Technet Wiki article:
+
+[OneDrive for Business notification settings with Powershell](https://social.technet.microsoft.com/wiki/contents/articles/39385.onedrive-for-business-notifications-with-powershell.aspx)
+
+## How to use?
+
+- Download and open the .ps1 file.
+- Add correct libraries:
+
+```PowerShell
+#Paths to SDK
+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\SharePoint Client Components\16.0\Assemblies\Microsoft.Online.SharePoint.Client.Tenant.dll"
+```
+
+- enter the correct url and admin login:
+
+```PowerShell
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="admin@TENANT.onmicrosoft.com"
+$Url="https://TENANT-admin.sharepoint.com"
+$NotifyOwnersWhenItemsReshare=$true #Whether ODB owner should be notified the content is reshared with external users
+```
+
+- Run the script
diff --git a/Site Management/Get site groups from root and subsites/Capture432.PNG b/Site Management/Get site groups from root and subsites/Capture432.PNG
new file mode 100644
index 00000000..e4b16f3e
Binary files /dev/null and b/Site Management/Get site groups from root and subsites/Capture432.PNG differ
diff --git a/Site Management/Get site groups from root and subsites/Get-SPOAllSiteGroups.ps1 b/Site Management/Get site groups from root and subsites/Get-SPOAllSiteGroups.ps1
new file mode 100644
index 00000000..532e9ad6
--- /dev/null
+++ b/Site Management/Get site groups from root and subsites/Get-SPOAllSiteGroups.ps1
@@ -0,0 +1,57 @@
+function Get-SPOAllSiteGroups
+{
+
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ [SecureString]$AdminPassword,
+ [Parameter(Mandatory=$false,Position=4)]
+ [string]$csvPath
+ )
+
+
+
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
+ $ctx.Load($ctx.Web.Lists)
+ $ctx.Load($ctx.Web)
+ $ctx.Load($ctx.Web.Webs)
+ $ctx.Load($ctx.Web.SiteGroups)
+ $ctx.ExecuteQuery()
+ #Write-Host $csvPath -ForegroundColor Green
+ foreach($sg in $ctx.Web.SiteGroups)
+ {
+ $sg | Add-Member NoteProperty WebUrl($ctx.Web.Url)
+ Export-Csv -InputObject $sg -Path $csvPath -Append
+
+ # Write-Host $ctx.Web.Url " " $sg.Title
+
+ }
+
+ foreach($web in $ctx.Web.Webs)
+ {
+ Get-SPOAllSiteGroups -Username $Username -Url $web.Url -AdminPassword $AdminPassword -csvPath $csvPath
+
+ }
+
+
+
+ }
+
+
+# Paths to SDK. Please verify location on your computer.
+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"
+
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="arleta@Tenant.onmicrosoft.com"
+$Url="https://Tenant.sharepoint.com"
+$csvPath="C:\Users\Public\AllSiteGroups2.csv"
+
+
+
+Get-SPOAllSiteGroups -Username $username -Url $Url -AdminPassword $AdminPassword -csvPath $csvPath
diff --git a/Site Management/Get site groups from root and subsites/description.md b/Site Management/Get site groups from root and subsites/description.md
new file mode 100644
index 00000000..33a59aaa
--- /dev/null
+++ b/Site Management/Get site groups from root and subsites/description.md
@@ -0,0 +1,49 @@
+A short Powershell script that retrieves all site groups from the root site and all subsites in a site collection. blaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+
+
+
+
+
+
+How to use?
+1. Download and open the .ps1 file.
+
+2. Adjust paths to SharePoint Online SDK:
+
+
+
+PowerShell
+# Paths to SDK. Please verify location on your computer.
+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"
+
+
+
+3. Enter your tenant data. DO NOT enter password. You will be asked for it during script's execution:
+
+
+
+```PowerShell
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="arleta@Tenant.onmicrosoft.com"
+$Url="https://Tenant.sharepoint.com"
+$csvPath="C:\Users\Public\AllSiteGroups2.csv"
+
+
+
+
+
+
+
+Expected results:
+
+
+
+
+
+
+
+
+
diff --git a/Site Management/Recycle Bin/Restore deleted items from a single subsite/Capture8.PNG b/Site Management/Recycle Bin/Restore deleted items from a single subsite/Capture8.PNG
new file mode 100644
index 00000000..32f3d492
Binary files /dev/null and b/Site Management/Recycle Bin/Restore deleted items from a single subsite/Capture8.PNG differ
diff --git a/Site Management/Recycle Bin/Restore deleted items from a single subsite/Capture9.PNG b/Site Management/Recycle Bin/Restore deleted items from a single subsite/Capture9.PNG
new file mode 100644
index 00000000..d5de689e
Binary files /dev/null and b/Site Management/Recycle Bin/Restore deleted items from a single subsite/Capture9.PNG differ
diff --git a/Site Management/Recycle Bin/Restore deleted items from a single subsite/description.md b/Site Management/Recycle Bin/Restore deleted items from a single subsite/description.md
new file mode 100644
index 00000000..3c5dc5e1
--- /dev/null
+++ b/Site Management/Recycle Bin/Restore deleted items from a single subsite/description.md
@@ -0,0 +1,41 @@
+The script retrieves deleted items from a single site, displays them and restores.
+
+
+
+The script first displays the items to be restored. You can then decide whether to restore them all or not:
+
+
+
+
+
+
+
+
+
+The script requires SharePoint Online SDK.
+
+
+
+
+
+How to use?
+1. Download and open the file.
+
+2. Verify the paths to SDK are correct:
+
+PowerShell
+# Paths to SDK. Please verify location on your computer.
+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"
+
+3. Enter the data. DO NOT enter your password. You will be asked for it during the script execution.
+
+PowerShell
+# Insert the credentials and the name of the admin site
+$Username="arleta@tenant.onmicrosoft.com"
+$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
+$Site="https://tenant.sharepoint.com/sub1"
+
+
+
+
diff --git a/Site Management/Recycle Bin/Restore deleted items from a single subsite/restoreDeletedFromOneSite.ps1 b/Site Management/Recycle Bin/Restore deleted items from a single subsite/restoreDeletedFromOneSite.ps1
new file mode 100644
index 00000000..ed04fbb9
--- /dev/null
+++ b/Site Management/Recycle Bin/Restore deleted items from a single subsite/restoreDeletedFromOneSite.ps1
@@ -0,0 +1,120 @@
+function Get-DeletedItems
+{
+param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ $AdminPassword,
+ [Parameter(Mandatory=$true,Position=3)]
+ [string]$Url
+)
+
+
+#Create the context and test the connection
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
+
+ try
+ {
+ $ctx.ExecuteQuery()
+ }
+ catch [Net.WebException]
+ {
+ Write-Host $Url " failed to connect to the site" $_.Exception.Message.ToString() -ForegroundColor Red
+ }
+
+
+
+# Retrieve recycle bin items from a single subsite
+ $ctx.Load($ctx.Site)
+ $rb=$ctx.Web.RecycleBin
+ $ctx.Load($rb)
+
+ try
+ {
+ $ctx.ExecuteQuery()
+ Write-Host $ctx.Site.Url " Items in the recycle bin: " $rb.Count.ToString()
+ }
+ catch [Net.WebException]
+ {
+ Write-Host $ctx.Site.Url " failed" $_.Exception.Message.ToString() -ForegroundColor Red
+
+ }
+
+$myarray=@()
+
+#Add the items to an array and display them for a user
+ for($i=0;$i -lt $rb.Count ;$i++)
+ {
+
+ $ctx.Load($rb[$i].Author)
+ $ctx.Load($rb[$i].DeletedBy)
+ $ctx.ExecuteQuery()
+ $obj = $rb[$i]
+ $obj | Add-Member NoteProperty AuthorLoginName($rb[$i].Author.LoginName)
+ $obj | Add-Member NoteProperty DeletedByLoginName($rb[$i].DeletedBy.LoginName)
+ $myarray+=$obj
+ Write-Host ($obj.DirName+"/"+$obj.LeafName)
+
+ }
+
+# Asks permission to restore
+Write-Host "`n`nProceed with restoring all these items?" -ForegroundColor Green
+$proceed=Read-Host "y/n"
+
+ if($proceed -eq "y")
+ {
+ for($i=0;$i -lt $myarray.Count ; $i++)
+ {
+ #Restores a single item
+ $myarray[$i].Restore()
+
+ try
+ {
+ $ctx.ExecuteQuery()
+ Write-Host $myarray[$i].LeafName " restored" -ForegroundColor Green
+ }
+ catch [Net.WebException]
+ {
+ Write-Host $myarray[$i].LeafName " failed" $_.Message.ToString() -ForegroundColor Red
+ }
+ }
+ }
+ elseif($proceed -eq "n")
+ {
+ Write-Host "No items will be restored"
+ }
+ else
+ {
+ Write-Host "Command not recognized"
+ }
+
+
+
+
+
+
+
+}
+
+
+
+
+# Paths to SDK. Please verify location on your computer.
+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"
+
+# Insert the credentials and the name of the admin site
+$Username="arleta@tenant.onmicrosoft.com"
+$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
+$Site="https://tenant.sharepoint.com/sub1"
+
+
+
+ Get-DeletedItems -Username $Username -AdminPassword $AdminPassword -Url $Site
+
+
+
+
+
+
diff --git a/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/GetDeletedItemsSPServer.ps1 b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/GetDeletedItemsSPServer.ps1
new file mode 100644
index 00000000..74aa0aaa
--- /dev/null
+++ b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/GetDeletedItemsSPServer.ps1
@@ -0,0 +1,121 @@
+function Get-DeletedItems
+{
+param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ $AdminPassword,
+ [Parameter(Mandatory=$true,Position=3)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=4)]
+ [string]$UserUpn,
+ [Parameter(Mandatory=$true)]
+ [string]$CSVPath
+)
+#$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
+ #$ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ #$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
+ $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object System.Net.NetworkCredential($Username, $AdminPassword)
+try
+{
+$ctx.ExecuteQuery()
+} catch [Net.WebException]
+ {
+
+ Write-Host $Url " failed to connect to the site" $_.Exception.Message.ToString() -ForegroundColor Red
+}
+
+ $ctx.Load($ctx.Site)
+ $ctx.Load($ctx.Web.Webs)
+ $rb=$ctx.Site.RecycleBin
+$ctx.Load($rb)
+try
+{
+$ctx.ExecuteQuery()
+Write-Host $ctx.Site.Url " Items in the recycle bin: " $rb.Count.ToString()
+} catch [Net.WebException]
+ {
+
+ Write-Host $ctx.Site.Url " failed" $_.Exception.Message.ToString() -ForegroundColor Red
+
+}
+
+$myarray=@()
+for($i=0;$i -lt $rb.Count ;$i++)
+{
+
+ $ctx.Load($rb[$i].Author)
+ $ctx.Load($rb[$i].DeletedBy)
+ $ctx.ExecuteQuery()
+ $obj = $rb[$i]
+ $obj | Add-Member NoteProperty AuthorLoginName($rb[$i].Author.LoginName)
+ $obj | Add-Member NoteProperty DeletedByLoginName($rb[$i].DeletedBy.LoginName)
+ $myarray+=$obj
+Export-CSV -InputObject $obj -LiteralPath $csvPath -Append
+}
+
+Write-Host "Items to process: " $myarray.Count
+#Export-CSV -InputObject $myarray -LiteralPath $csvPath -Append
+$ProceedToRestore=Read-Host "Proceed to restore? y/n"
+
+ if($ProceedToRestore -eq "y")
+ {
+ for($i=0;$i -lt $myarray.Count ; $i++)
+ {
+
+ if($myarray[$i].DeletedByLoginName -eq $UserUpn )
+ {
+ $myarray[$i].Restore()
+ try
+ {
+ $ctx.ExecuteQuery()
+ Write-Host $myarray[$i].LeafName " restored" -ForegroundColor Green
+ }
+ catch [Net.WebException]
+ {
+ Write-Host $myarray[$i].LeafName " failed" $_.Message.ToString() -ForegroundColor Red
+ }
+ }
+ }
+
+ }
+ elseif($ProceedToRestore -match "n")
+ {
+ Write-Host "Not restoring"
+
+ }
+ else
+ {
+ Write-Host "Not recognized"
+ }
+
+
+}
+
+
+
+
+# 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"
+Add-PSSnapin Microsoft.SharePoint.PowerShell
+
+# Insert the credentials and the name of the admin site
+$Username="CORPO\Administrator"
+$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
+
+$csvPath="C:\Users\Public\expo3.csv"
+$userupn="i:0#.w|corpo\administrator"
+#Connect-SPOService -Url $adminUrl
+$sites=(Get-SPSite -Limit All).Url
+
+foreach($site in $sites)
+{
+
+ Get-DeletedItems -Username $Username -AdminPassword $AdminPassword -Url $site -UserUpn $userupn -CSVPath $csvPath
+
+}
+
+
+
diff --git a/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/description.md b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/description.md
new file mode 100644
index 00000000..3663361e
--- /dev/null
+++ b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/description.md
@@ -0,0 +1,67 @@
+Imagine that your employee wreaked havoc in all the Sharepoint sites he had access to, randomly deleting files, items, lists. Now you, as an admin, need to restore them. Of course you can do it one by one searching through all the recycle bins, but... there is the Powershell :)
+
+ If you need a variation of the script, just leave a comment, how you think it could be more useful.
+
+
+
+
+
+
+
+
+
+The script loops across all site collections' recycle bins and finds all items one user deleted and restores them all.
+
+
+
+
+
+
+
+ Atfer each site the script will ask you if it should proceed to restore the items:
+
+
+
+
+
+If the item is DELETED BY a specified user, it is registered in a csv file (regardless of whether you decide to restore it or not):
+
+
+
+If you decide to restore the items from a given site collection (all or none, you can't select), enter "y" and the script will restore them and print out their names in green.
+
+If it runs into any troubles (e.g. it cannot access site) it will notify you about it in red
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Before running the script you need to open the file and enter the correct the data:
+
+
+
+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"
+Add-PSSnapin Microsoft.SharePoint.PowerShell
+
+# Insert the credentials and the name of the admin site
+$Username="CORPO\Administrator"
+$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
+
+$csvPath="C:\Users\Public\expo3.csv"
+$userupn="i:0#.w|corpo\administrator"
+
diff --git a/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/Capture5.PNG b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/Capture5.PNG
new file mode 100644
index 00000000..fd96c5f0
Binary files /dev/null and b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/Capture5.PNG differ
diff --git a/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/Capture6.PNG b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/Capture6.PNG
new file mode 100644
index 00000000..6102e32e
Binary files /dev/null and b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/Capture6.PNG differ
diff --git a/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/RestoreBasedAllSiteCollections1.PNG b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/RestoreBasedAllSiteCollections1.PNG
new file mode 100644
index 00000000..7e235dd8
Binary files /dev/null and b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/RestoreBasedAllSiteCollections1.PNG differ
diff --git a/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/RestoreBasedAllSiteCollections21.PNG b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/RestoreBasedAllSiteCollections21.PNG
new file mode 100644
index 00000000..69cb87f3
Binary files /dev/null and b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/RestoreBasedAllSiteCollections21.PNG differ
diff --git a/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/tobedeleted.txt b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/tobedeleted.txt
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/images/tobedeleted.txt
@@ -0,0 +1 @@
+
diff --git a/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/readme.md b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/readme.md
new file mode 100644
index 00000000..3663361e
--- /dev/null
+++ b/Site Management/Recycle Bin/SPServer/Restore all files items lists deleted by a single employee/readme.md
@@ -0,0 +1,67 @@
+Imagine that your employee wreaked havoc in all the Sharepoint sites he had access to, randomly deleting files, items, lists. Now you, as an admin, need to restore them. Of course you can do it one by one searching through all the recycle bins, but... there is the Powershell :)
+
+ If you need a variation of the script, just leave a comment, how you think it could be more useful.
+
+
+
+
+
+
+
+
+
+The script loops across all site collections' recycle bins and finds all items one user deleted and restores them all.
+
+
+
+
+
+
+
+ Atfer each site the script will ask you if it should proceed to restore the items:
+
+
+
+
+
+If the item is DELETED BY a specified user, it is registered in a csv file (regardless of whether you decide to restore it or not):
+
+
+
+If you decide to restore the items from a given site collection (all or none, you can't select), enter "y" and the script will restore them and print out their names in green.
+
+If it runs into any troubles (e.g. it cannot access site) it will notify you about it in red
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Before running the script you need to open the file and enter the correct the data:
+
+
+
+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"
+Add-PSSnapin Microsoft.SharePoint.PowerShell
+
+# Insert the credentials and the name of the admin site
+$Username="CORPO\Administrator"
+$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
+
+$csvPath="C:\Users\Public\expo3.csv"
+$userupn="i:0#.w|corpo\administrator"
+
diff --git a/Tenant Settings/Report on SharePoint Online tenant properties/Untitled103.png b/Tenant Settings/Report on SharePoint Online tenant properties/Untitled103.png
new file mode 100644
index 00000000..c22bf757
Binary files /dev/null and b/Tenant Settings/Report on SharePoint Online tenant properties/Untitled103.png differ
diff --git a/Tenant Settings/Report on SharePoint Online tenant properties/description.md b/Tenant Settings/Report on SharePoint Online tenant properties/description.md
new file mode 100644
index 00000000..a16bcb65
--- /dev/null
+++ b/Tenant Settings/Report on SharePoint Online tenant properties/description.md
@@ -0,0 +1,189 @@
+Short Powershell script to export SharePoint Online tenant properties. It will display values for the following properties:
+
+
+
+AllowedDomainListForSyncClient : {}
+
+BccExternalSharingInvitations : False
+
+BccExternalSharingInvitationsList :
+
+BlockDownloadOfAllFilesForGuests : False
+
+BlockDownloadOfAllFilesOnUnmanagedDevices : False
+
+BlockDownloadOfViewableFilesForGuests : False
+
+BlockDownloadOfViewableFilesOnUnmanagedDevices : False
+
+BlockMacSync : False
+
+CommentsOnSitePagesDisabled : False
+
+CompatibilityRange : 15,15
+
+DefaultSharingLinkType : AnonymousAccess
+
+DisableReportProblemDialog : False
+
+DisallowInfectedFileDownload : False
+
+DisplayStartASiteOption : True
+
+EnableGuestSignInAcceleration : False
+
+ExcludedFileExtensionsForSyncClient : {}
+
+ExternalServicesEnabled : True
+
+FileAnonymousLinkType : Edit
+
+FolderAnonymousLinkType : Edit
+
+HideSyncButtonOnODB : False
+
+IPAddressAllowList :
+
+IPAddressEnforcement : False
+
+IPAddressWACTokenLifetime : 15
+
+IsUnmanagedSyncClientForTenantRestricted : False
+
+IsUnmanagedSyncClientRestrictionFlightEnabled : True
+
+LegacyAuthProtocolsEnabled : True
+
+NoAccessRedirectUrl :
+
+NotificationsInOneDriveForBusinessEnabled : True
+
+NotificationsInSharePointEnabled : True
+
+NotifyOwnersWhenInvitationsAccepted : True
+
+NotifyOwnersWhenItemsReshared : True
+
+ODBAccessRequests : Unspecified
+
+ODBMembersCanShare : Unspecified
+
+OfficeClientADALDisabled : False
+
+OneDriveForGuestsEnabled : False
+
+OneDriveStorageQuota : 1048576
+
+OptOutOfGrooveBlock : False
+
+OptOutOfGrooveSoftBlock : False
+
+OrphanedPersonalSitesRetentionPeriod : 30
+
+OwnerAnonymousNotification : True
+
+PermissiveBrowserFileHandlingOverride : False
+
+PreventExternalUsersFromResharing : False
+
+ProvisionSharedWithEveryoneFolder : False
+
+PublicCdnAllowedFileTypes : CSS,EOT,GIF,ICO,JPEG,JPG,JS,MAP,PNG,SVG,TTF,WOFF
+
+PublicCdnEnabled : False
+
+PublicCdnOrigins : {}
+
+RequireAcceptingAccountMatchInvitedAccount : False
+
+RequireAnonymousLinksExpireInDays : 0
+
+ResourceQuota : 5300
+
+ResourceQuotaAllocated : 1700
+
+RootSiteUrl : https://cfschulung.sharepoint.com
+
+SearchResolveExactEmailOrUPN : False
+
+SharingAllowedDomainList :
+
+SharingBlockedDomainList :
+
+SharingCapability : ExternalUserAndGuestSharing
+
+SharingDomainRestrictionMode : None
+
+ShowAllUsersClaim : True
+
+ShowEveryoneClaim : True
+
+ShowEveryoneExceptExternalUsersClaim : True
+
+ShowNGSCDialogForSyncOnODB : True
+
+ShowPeoplePickerSuggestionsForGuestUsers : False
+
+SignInAccelerationDomain :
+
+SpecialCharactersStateInFileFolderNames : Allowed
+
+StartASiteFormUrl :
+
+StorageQuota : 1061376
+
+StorageQuotaAllocated : 576716800
+
+UseFindPeopleInPeoplePicker : False
+
+UsePersistentCookiesForExplorerView : False
+
+UserVoiceForFeedbackEnabled : True
+
+Context : Microsoft.SharePoint.Client.ClientContext
+
+Tag :
+
+Path : Microsoft.SharePoint.Client.ObjectPathIdentity
+
+ObjectVersion :
+
+ServerObjectIsNull : False
+
+TypedObject
+
+
+
+
+
+ Expected results
+
+
+
+
+
+
+
+
+### How to use?
+Download and open the .ps1 file.
+Add correct libraries:
+
+
+```PowerShell
+#Paths to SDK
+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\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.Online.SharePoint.Client.Tenant.dll"
+```
+Enter the correct url and admin login:
+```PowerShell
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="arleta@TENANT.onmicrosoft.com"
+$Url="https://Tenant-admin.sharepoint.com"
+$CSVPath="C:\Users\Public\testTenantSettings.csv"
+```
+ Run the script
+
+
+
diff --git a/Tenant Settings/Report on SharePoint Online tenant properties/tenantProps.ps1 b/Tenant Settings/Report on SharePoint Online tenant properties/tenantProps.ps1
new file mode 100644
index 00000000..c6b032bb
--- /dev/null
+++ b/Tenant Settings/Report on SharePoint Online tenant properties/tenantProps.ps1
@@ -0,0 +1,45 @@
+function Get-SiteColl
+{
+param (
+ [Parameter(Mandatory=$true,Position=1)]
+ [string]$Username,
+ [Parameter(Mandatory=$true,Position=2)]
+ [string]$Url,
+ [Parameter(Mandatory=$true,Position=3)]
+ $password,
+ [Parameter(Mandatory=$true,Position=4)]
+ [string]$CSVPath
+ )
+
+
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
+ $ctx.Load($ctx.Web)
+ $ctx.ExecuteQuery()
+
+ $spoTenant= New-Object Microsoft.Online.SharePoint.TenantAdministration.Tenant($Ctx)
+ $ctx.Load($spoTenant)
+ $ctx.ExecuteQuery()
+
+ $spoTenant | Export-Csv -Path $CSVPath
+
+}
+
+
+
+
+#Paths to SDK
+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\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell\Microsoft.Online.SharePoint.Client.Tenant.dll"
+#Microsoft.Online.SharePoint.TenantAdministration.SiteProperties.AllowLimitedAccess
+
+
+#Enter the data
+$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
+$username="arleta@TENANT.onmicrosoft.com"
+$Url="https://Tenant-admin.sharepoint.com"
+$CSVPath="C:\Users\Public\testTenantSettings.csv"
+
+
+
+Get-SiteColl -Username $username -Url $Url -password $AdminPassword -CSVPath $CSVPath
diff --git a/Versioning/Get versioning settings for all lists/Capture431.PNG b/Versioning/Get versioning settings for all lists/Capture431.PNG
new file mode 100644
index 00000000..41f0400d
Binary files /dev/null and b/Versioning/Get versioning settings for all lists/Capture431.PNG differ
diff --git a/Versioning/Get versioning settings for all lists/GetVersioningSettings.ps1 b/Versioning/Get versioning settings for all lists/GetVersioningSettings.ps1
new file mode 100644
index 00000000..9210a2d5
--- /dev/null
+++ b/Versioning/Get versioning settings for all lists/GetVersioningSettings.ps1
@@ -0,0 +1,78 @@
+function getall($urelek)
+{
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($urelek)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
+ $ctx.Load($ctx.Web.Lists)
+ $ctx.Load($ctx.Web)
+ $ctx.Load($ctx.Web.Webs)
+ $ctx.ExecuteQuery()
+ Write-Host
+ Write-Host $ctx.Url -BackgroundColor White -ForegroundColor DarkGreen
+ foreach( $list in $ctx.Web.Lists)
+ {
+ $ctx.Load($list)
+
+ try
+ {
+ $ctx.ExecuteQuery()
+ $VersioningDetails = New-Object PSObject -Property @{
+ 'List' = $list.Title
+ 'Url'= $list.ParentWebUrl
+ 'Require Content Approval' = $list.EnableModeration
+ 'Versioning Enabled' = $list.EnableVersioning
+ 'Major Version limit' = $list.MajorVersionLimit
+ 'Draft Version limit' = $list.MajorWithMinorVersionsLimit
+ 'Drafts visible to' = $list.DraftVersionVisibility
+ 'Checkout required' = $list.ForceCheckout
+ }
+ Write-Host $list.Title -ForegroundColor DarkGreen
+
+ $Global:csv+= $VersioningDetails
+ }
+
+ catch
+ {
+ #$Global:csv+= $csvvalue
+ Write-Host $list.Title -ForegroundColor Red
+ }
+
+
+
+ }
+
+ if($ctx.Web.Webs.Count -gt 0)
+ {
+ for($i=0; $i -lt $ctx.Web.Webs.Count ; $i++)
+ {
+ getall($ctx.Web.Webs[$i].Url)
+ }
+
+ }
+
+
+
+}
+
+# Paths to SDK. Please verify location on your computer.
+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"
+
+
+
+# You can also enter credentials directly: $siteUrl="https://tenant-admin.sharepoint.com"
+$siteUrl = Read-Host -Prompt "Enter https://tenant-admin.sharepoint.com”
+$username = Read-Host -Prompt "Enter admin's login, e.g. admin@domain.onmicrosoft.com"
+$password = Read-Host -Prompt "Enter password" -AsSecureString
+$credy= New-Object System.Management.Automation.PSCredential($username,$password)
+Connect-SPOService -Credential $credy -Url $siteUrl
+
+$sitecollections=get-SPOSite
+$Global:csv=@()
+
+foreach($sitecoll in $sitecollections)
+{
+ getall($sitecoll.Url)
+}
+
+# Specify the path where the log file will be published
+$Global:csv | Export-Csv -Path C:\Users\Public\Versioning5.csv
diff --git a/Versioning/Get versioning settings for all lists/description.md b/Versioning/Get versioning settings for all lists/description.md
new file mode 100644
index 00000000..8ac15997
--- /dev/null
+++ b/Versioning/Get versioning settings for all lists/description.md
@@ -0,0 +1,32 @@
+A short script that checks versioning settings for all the libraries and lists in the whole tenant.
+
+
+
+It requires SharePoint Online Management Shell and SharePoint SDK installed.
+
+
+
+It uses recurrence to find all sites in all site collections and then goes through all the lists.
+
+At the end, a csv file is generated with the lists' urls and settings:
+
+
+
+
+
+As the script runs you will see green lists' titles for which the setting was successfully retrieved and red for those which failed.
+
+
+
+
+
+### How to use?
+Download and open the .ps1 file.
+Add correct SharePoint Online SDK libraries:
+
+
+```PowerShell
+# Paths to SDK. Please verify location on your computer.
+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"
+
diff --git a/Workflows/Get workflow report for a site collection/SampleResults.csv b/Workflows/Get workflow report for a site collection/SampleResults.csv
new file mode 100644
index 00000000..e5529813
--- /dev/null
+++ b/Workflows/Get workflow report for a site collection/SampleResults.csv
@@ -0,0 +1,3 @@
+#TYPE Microsoft.SharePoint.Client.Workflow.WorkflowAssociation
+"SiteUrl","ListTitle","AllowManual","AssociationData","AutoStartChange","AutoStartCreate","BaseId","Created","Description","Enabled","HistoryListTitle","Id","InstantiationUrl","InternalName","IsDeclarative","ListId","Modified","Name","TaskListTitle","WebId","Context","Tag","Path","ObjectVersion","ServerObjectIsNull","TypedObject"
+"https://etr45.sharepoint.com/sites/test1","test","True","false{32613E0A-2A96-4C71-A60E-9B8D1899FA6C}Enter Choice #1Enter Choice #2Enter Choice #3Workflow initiated: True{FA564E0F-0C70-4AB9-B863-0177E6DDD247}A workflow has been initiated on the following list item.True{FA564E0F-0C70-4AB9-B863-0177E6DDD247}TrueTrue{28CF69C5-FA48-462A-B5CD-27B6F9D2BD5F}UseAT{1DF5E554-EC7E-46A6-901D-D85A3881CB18}TrueTrueTrueTrueReview taskTrue{FA564E0F-0C70-4AB9-B863-0177E6DDD247}A review task has been created for the following list item.True{FA564E0F-0C70-4AB9-B863-0177E6DDD247}TrueTrue{28CF69C5-FA48-462A-B5CD-27B6F9D2BD5F}UseAT{1DF5E554-EC7E-46A6-901D-D85A3881CB18}TrueTrueTrueTrue","False","True","c6964bff-bf8d-41ac-ad5e-b61ec111731a","3/8/2020 12:19:48","Use this workflow to track items in a list.","True","Workflow History","41a550db-b5df-4fa7-b6d4-3cc1e5bb1a5a",,"test wf","False","91fb8ab4-ecf8-4f4a-becf-adb32f5d3f09","3/8/2020 12:19:48","test wf","Tasks","0da03cb4-066c-45ff-97c9-1d0a756e0c16","Microsoft.SharePoint.Client.ClientContext",,"Microsoft.SharePoint.Client.ObjectPathIdentity",,"False","Microsoft.SharePoint.Client.Workflow.WorkflowAssociation"
diff --git a/Workflows/Get workflow report for all site collections/SampleResults.csv b/Workflows/Get workflow report for all site collections/SampleResults.csv
new file mode 100644
index 00000000..e5529813
--- /dev/null
+++ b/Workflows/Get workflow report for all site collections/SampleResults.csv
@@ -0,0 +1,3 @@
+#TYPE Microsoft.SharePoint.Client.Workflow.WorkflowAssociation
+"SiteUrl","ListTitle","AllowManual","AssociationData","AutoStartChange","AutoStartCreate","BaseId","Created","Description","Enabled","HistoryListTitle","Id","InstantiationUrl","InternalName","IsDeclarative","ListId","Modified","Name","TaskListTitle","WebId","Context","Tag","Path","ObjectVersion","ServerObjectIsNull","TypedObject"
+"https://etr45.sharepoint.com/sites/test1","test","True","false{32613E0A-2A96-4C71-A60E-9B8D1899FA6C}Enter Choice #1Enter Choice #2Enter Choice #3Workflow initiated: True{FA564E0F-0C70-4AB9-B863-0177E6DDD247}A workflow has been initiated on the following list item.True{FA564E0F-0C70-4AB9-B863-0177E6DDD247}TrueTrue{28CF69C5-FA48-462A-B5CD-27B6F9D2BD5F}UseAT{1DF5E554-EC7E-46A6-901D-D85A3881CB18}TrueTrueTrueTrueReview taskTrue{FA564E0F-0C70-4AB9-B863-0177E6DDD247}A review task has been created for the following list item.True{FA564E0F-0C70-4AB9-B863-0177E6DDD247}TrueTrue{28CF69C5-FA48-462A-B5CD-27B6F9D2BD5F}UseAT{1DF5E554-EC7E-46A6-901D-D85A3881CB18}TrueTrueTrueTrue","False","True","c6964bff-bf8d-41ac-ad5e-b61ec111731a","3/8/2020 12:19:48","Use this workflow to track items in a list.","True","Workflow History","41a550db-b5df-4fa7-b6d4-3cc1e5bb1a5a",,"test wf","False","91fb8ab4-ecf8-4f4a-becf-adb32f5d3f09","3/8/2020 12:19:48","test wf","Tasks","0da03cb4-066c-45ff-97c9-1d0a756e0c16","Microsoft.SharePoint.Client.ClientContext",,"Microsoft.SharePoint.Client.ObjectPathIdentity",,"False","Microsoft.SharePoint.Client.Workflow.WorkflowAssociation"
diff --git a/Workflows/Get workflow report for one site/SampleResults.csv b/Workflows/Get workflow report for one site/SampleResults.csv
new file mode 100644
index 00000000..e5529813
--- /dev/null
+++ b/Workflows/Get workflow report for one site/SampleResults.csv
@@ -0,0 +1,3 @@
+#TYPE Microsoft.SharePoint.Client.Workflow.WorkflowAssociation
+"SiteUrl","ListTitle","AllowManual","AssociationData","AutoStartChange","AutoStartCreate","BaseId","Created","Description","Enabled","HistoryListTitle","Id","InstantiationUrl","InternalName","IsDeclarative","ListId","Modified","Name","TaskListTitle","WebId","Context","Tag","Path","ObjectVersion","ServerObjectIsNull","TypedObject"
+"https://etr45.sharepoint.com/sites/test1","test","True","false{32613E0A-2A96-4C71-A60E-9B8D1899FA6C}Enter Choice #1Enter Choice #2Enter Choice #3Workflow initiated: True{FA564E0F-0C70-4AB9-B863-0177E6DDD247}A workflow has been initiated on the following list item.True{FA564E0F-0C70-4AB9-B863-0177E6DDD247}TrueTrue{28CF69C5-FA48-462A-B5CD-27B6F9D2BD5F}UseAT{1DF5E554-EC7E-46A6-901D-D85A3881CB18}TrueTrueTrueTrueReview taskTrue{FA564E0F-0C70-4AB9-B863-0177E6DDD247}A review task has been created for the following list item.True{FA564E0F-0C70-4AB9-B863-0177E6DDD247}TrueTrue{28CF69C5-FA48-462A-B5CD-27B6F9D2BD5F}UseAT{1DF5E554-EC7E-46A6-901D-D85A3881CB18}TrueTrueTrueTrue","False","True","c6964bff-bf8d-41ac-ad5e-b61ec111731a","3/8/2020 12:19:48","Use this workflow to track items in a list.","True","Workflow History","41a550db-b5df-4fa7-b6d4-3cc1e5bb1a5a",,"test wf","False","91fb8ab4-ecf8-4f4a-becf-adb32f5d3f09","3/8/2020 12:19:48","test wf","Tasks","0da03cb4-066c-45ff-97c9-1d0a756e0c16","Microsoft.SharePoint.Client.ClientContext",,"Microsoft.SharePoint.Client.ObjectPathIdentity",,"False","Microsoft.SharePoint.Client.Workflow.WorkflowAssociation"