diff --git a/Content Types/Content Types Management Setting/Allow content type management for all lists in a site/description.md b/Content Types/Content Types Management Setting/Allow content type management for all lists in a site/description.md
index a0d6f92d..fdc22124 100644
--- a/Content Types/Content Types Management Setting/Allow content type management for all lists in a site/description.md
+++ b/Content Types/Content Types Management Setting/Allow content type management for all lists in a site/description.md
@@ -22,9 +22,9 @@ $Url="https://trialtrial123.sharepoint.com/sites/teamsitewithlists"
$ContentTypesEnabled=$true
```
-###Please share your thoughts in the Q&A section!
+### Please share your thoughts in the Q&A section!
-####Related scripts
+#### Related scripts
[Set direction of the reading order for a single list](https://gallery.technet.microsoft.com/office/Set-SPOList-properties-9d16f2ba)
[Set-SPOList properties (module)](https://gallery.technet.microsoft.com/scriptcenter/Disable-or-enable-12cf3795)
diff --git a/Content Types/Content Types Management Setting/Allow content type management for all lists in site collection/ContentTypeManagementSubsitesIncluded.ps1 b/Content Types/Content Types Management Setting/Allow content type management for all lists in site collection/ContentTypeManagementSubsitesIncluded.ps1
index 9e762df4..71ad751b 100644
--- a/Content Types/Content Types Management Setting/Allow content type management for all lists in site collection/ContentTypeManagementSubsitesIncluded.ps1
+++ b/Content Types/Content Types Management Setting/Allow content type management for all lists in site collection/ContentTypeManagementSubsitesIncluded.ps1
@@ -3,61 +3,52 @@
# Created by Arleta Wanat, 2015
#
-function Set-SPOListsContentTypesEnabled
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SPOListsContentTypesEnabled{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$AdminPassword,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=4)]
+ [Parameter(Mandatory=$true,Position=4)]
[bool]$ContentTypesEnabled
-)
-
-$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
- $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
- $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
- $ctx.ExecuteQuery()
-
-$Lists=$ctx.Web.Lists
- $ctx.Load($ctx.Web)
- $ctx.Load($ctx.Web.Webs)
-$ctx.Load($Lists)
-$ctx.ExecuteQuery()
-
-Foreach($ll in $Lists)
-{
- $ll.ContentTypesEnabled = $ContentTypesEnabled
- $ll.Update()
-
-
- try
- {
- $ctx.ExecuteQuery()
- Write-Host $ll.Title " Done" -ForegroundColor Green
- }
-
- catch [Net.WebException]
- {
-
- Write-Host "Failed" $_.Exception.ToString() -ForegroundColor Red
- }
+ )
+
+ $password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
+ $ctx.ExecuteQuery()
+
+ $Lists=$ctx.Web.Lists
+ $ctx.Load($ctx.Web)
+ $ctx.Load($ctx.Web.Webs)
+ $ctx.Load($Lists)
+ $ctx.ExecuteQuery()
+
+ Foreach($ll in $Lists){
+ $ll.ContentTypesEnabled = $ContentTypesEnabled
+ $ll.Update()
+
+ try{
+ $ctx.ExecuteQuery()
+ Write-Host $ll.Title " Done" -ForegroundColor Green
+ }
+ catch [Net.WebException]{
+ Write-Host "Failed" $_.Exception.ToString() -ForegroundColor Red
+ }
+ }
+
+ if($ctx.Web.Webs.Count -gt 0){
+ Write-Host "--"-ForegroundColor DarkGreen
+
+ for($i=0;$i -lt $ctx.Web.Webs.Count ;$i++){
+ Set-SPOListsContentTypesEnabled -Username $Username -Url $ctx.Web.Webs[$i].Url -AdminPassword $AdminPassword -ContentTypesEnabled $ContentTypesEnabled
+ }
+ }
}
-if($ctx.Web.Webs.Count -gt 0)
- {
- Write-Host "--"-ForegroundColor DarkGreen
- for($i=0;$i -lt $ctx.Web.Webs.Count ;$i++)
- {
- Set-SPOListsContentTypesEnabled -Username $Username -Url $ctx.Web.Webs[$i].Url -AdminPassword $AdminPassword -ContentTypesEnabled $ContentTypesEnabled
- }
- }
-
-}
-
@@ -80,4 +71,4 @@ $ContentTypesEnabled=$true
-Set-SPOListsContentTypesEnabled -Username $Username -AdminPassword $AdminPassword -Url $Url -ContentTypesEnabled $ContentTypesEnabled
\ No newline at end of file
+Set-SPOListsContentTypesEnabled -Username $Username -AdminPassword $AdminPassword -Url $Url -ContentTypesEnabled $ContentTypesEnabled
diff --git a/Content Types/Content Types Management Setting/Allow content type management for all lists in site collection/description.md b/Content Types/Content Types Management Setting/Allow content type management for all lists in site collection/description.md
index bc34af8c..eec2be23 100644
--- a/Content Types/Content Types Management Setting/Allow content type management for all lists in site collection/description.md
+++ b/Content Types/Content Types Management Setting/Allow content type management for all lists in site collection/description.md
@@ -1,29 +1,17 @@
A short Powershell script to allow management of content types for all SharePoint Online lists and libraries across all sites in a site collection
-
-
-It is an equivalent of List>>List Settings>>Advanced>>Content types in Graphic User Interface (see screenshot)
-
-
-
-
-
-
+It is an equivalent of **List**>>**List Settings**>>**Advanced**>>**Content types in Graphic User Interface** ([see screenshot](https://github.com/PowershellScripts/AllGalleryScriptsSamples/blob/develop/Content%20Types/Content%20Types%20Management%20Setting/Allow%20content%20type%20management%20for%20all%20lists%20in%20site%20collection/contentTypeManagement.png))
Applies to lists and libraries.
-
-
-It requires installed SharePoint Online SDK
+*It requires installed* [SharePoint Online SDK](www.microsoft.com/en-us/download/details.aspx?id=42038)
You have to enter the list information before running the script:
-
-
```PowerShell
# Paths to SDK. Please verify location on your computer.
@@ -36,33 +24,26 @@ $AdminPassword="Pass"
$Url="https://trialtrial123.sharepoint.com/sites/teamsitewithlists"
$ContentTypesEnabled=$true
```
-
-
-
-
-
-Please share your thoughts in the Q&A section!
-
-
+### Please share your thoughts in the Q&A section!
-Wiki article with detailed code description:
+#### Wiki article with detailed code description:
[SharePoint Online: Turn on support for multiple content types in a list or library using Powershell](http://social.technet.microsoft.com/wiki/contents/articles/30038.sharepoint-online-turn-on-support-for-multiple-content-types-in-a-list-or-library-using-powershell.aspx)
-Related scripts
-Set-SPOList properties (module)
+#### Related scripts
+[Set-SPOList properties (module)](https://gallery.technet.microsoft.com/office/Set-SPOList-properties-9d16f2ba)
-Disable or enable attachments to list items using Powershell
+[Disable or enable attachments to list items using Powershell](https://gallery.technet.microsoft.com/scriptcenter/Disable-or-enable-12cf3795)
-Change search setting for all lists in a site using CSOM and Powershell
+[Change search setting for all lists in a site using CSOM and Powershell](https://gallery.technet.microsoft.com/scriptcenter/Change-search-setting-for-8e842a48)
-Allow content type management for all lists in a site using Powershell
+[Allow content type management for all lists in a site using Powershell](https://gallery.technet.microsoft.com/scriptcenter/Allow-content-type-5bca5157)
-Set content type management setting for SharePoint Online list using Powershell
+[Set content type management setting for SharePoint Online list using Powershell](https://gallery.technet.microsoft.com/scriptcenter/Set-content-type-39ae4bce)
diff --git a/Content Types/Content Types Management Setting/Set content type management setting for a single list/ListContentTypes.ps1 b/Content Types/Content Types Management Setting/Set content type management setting for a single list/ListContentTypes.ps1
index db6603cf..a18ba4af 100644
--- a/Content Types/Content Types Management Setting/Set content type management setting for a single list/ListContentTypes.ps1
+++ b/Content Types/Content Types Management Setting/Set content type management setting for a single list/ListContentTypes.ps1
@@ -3,58 +3,45 @@
# Created by Arleta Wanat, 2015
#
-function Set-SPOList
-{
-param (
- [Parameter(Mandatory=$true,Position=0)]
+function Set-SPOList{
+ param(
+ [Parameter(Mandatory=$true,Position=0)]
[string]$ListName,
- [Parameter(Mandatory=$true,Position=1)]
+ [Parameter(Mandatory=$true,Position=1)]
[bool]$ContentTypesEnabled
- )
+ )
-$ll=$ctx.Web.Lists.GetByTitle($ListName)
+ $ll=$ctx.Web.Lists.GetByTitle($ListName)
-$ll.ContentTypesEnabled = $ContentTypesEnabled
- $ll.Update()
-
- try
- {
- $ctx.ExecuteQuery()
- Write-Host "Done" -ForegroundColor Green
- }
-
- catch [Net.WebException]
- {
-
- Write-Host "Failed" $_.Exception.ToString() -ForegroundColor Red
- }
-
+ $ll.ContentTypesEnabled = $ContentTypesEnabled
+ $ll.Update()
+ try{
+ $ctx.ExecuteQuery()
+ Write-Host "Done" -ForegroundColor Green
+ }
+ catch [Net.WebException]{
+ Write-Host "Failed" $_.Exception.ToString() -ForegroundColor Red
+ }
}
-
-
-
-function Connect-SPOCSOM
-{
- param (
- [Parameter(Mandatory=$true,Position=1)]
+function Connect-SPOCSOM{
+ param(
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$AdminPassword,
- [Parameter(Mandatory=$true,Position=2)]
+ [Parameter(Mandatory=$true,Position=2)]
[string]$Url
-)
+ )
-
-$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
- $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
- $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
- $ctx.ExecuteQuery()
-$global:ctx=$ctx
+ $password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
+ $ctx.ExecuteQuery()
+ $global:ctx=$ctx
}
-
$global:ctx
@@ -77,4 +64,4 @@ $ContentTypesEnabled =$false
Connect-SPOCSOM -Username $Username -AdminPassword $AdminPassword -Url $Url
-Set-SPOList -ListName $ListName -ContentTypesEnabled $ContentTypesEnabled
\ No newline at end of file
+Set-SPOList -ListName $ListName -ContentTypesEnabled $ContentTypesEnabled
diff --git a/Content Types/Create/Add Content Type to Lists with Workflows/description.md b/Content Types/Create/Add Content Type to Lists with Workflows/description.md
index 29aee1dd..b97da707 100644
--- a/Content Types/Create/Add Content Type to Lists with Workflows/description.md
+++ b/Content Types/Create/Add Content Type to Lists with Workflows/description.md
@@ -9,11 +9,9 @@ http://social.technet.microsoft.com/wiki/contents/articles/31051.sharepoint-onli
### How to use?
+1. Download and install [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038).
-
-1. Download and install SharePoint Online SDK.
-
-2. Download the .ps1 file.
+2. Download the *.ps1* file.
3. Open the file (you can do it also in NotePad)
@@ -33,15 +31,14 @@ $Name="Name of the Content Type2"
$ParentContentTypeID="0x01"
$Group="List Content Types"
```
-a) Find on your computer where SharePoint.Clitent.dll and SharePoint.Client.Runtime.dll libraries are located and insert the correct paths
-b) Instead of "admin@tenant.onmicrosoft.com" enter you username
-c) Instead of "https://tenant.sharepoint.com/sites/teamsitewithlibraries" enter the name of the site collection where you want to find the content types
-d) Fill in the properties of the content type.
+a) Find on your computer where SharePoint.Clitent.dll and SharePoint.Client.Runtime.dll libraries are located and insert the correct paths
+b) Instead of "admin@tenant.onmicrosoft.com" enter you username
+c) Instead of "https://tenant.sharepoint.com/sites/teamsitewithlibraries" enter the name of the site collection where you want to find the content types
+d) Fill in the properties of the content type.
-
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 Title of the List.
+6. When the script has executed, Powershell will show a message *Content Type Name of the Content Type2 has been added to Title of the List*.
Enjoy and please share feedback!
diff --git a/Content Types/Get/Get Names of all content types added to your lists/GetCTNamesinAllLists.ps1 b/Content Types/Get/Get Names of all content types added to your lists/GetCTNamesinAllLists.ps1
index d5c99a27..45c10140 100644
--- a/Content Types/Get/Get Names of all content types added to your lists/GetCTNamesinAllLists.ps1
+++ b/Content Types/Get/Get Names of all content types added to your lists/GetCTNamesinAllLists.ps1
@@ -1,64 +1,41 @@
-
-
-function Get-SPOList
-{
-
- param (
- [Parameter(Mandatory=$true,Position=1)]
+function Get-SPOList{
+ 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.Lists)
- $ctx.ExecuteQuery()
- Write-Host
- Write-Host $ctx.Url -BackgroundColor White -ForegroundColor DarkGreen
- foreach( $ll in $ctx.Web.Lists)
- {
+ )
- $ctx.Load($ll.ContentTypes)
+ $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
+ $ctx.ExecuteQuery()
- try
- {
- $ctx.ExecuteQuery()
- }
- catch
- {
- }
+ $ctx.Load($ctx.Web.Lists)
+ $ctx.ExecuteQuery()
+ Write-Host
+ Write-Host $ctx.Url -BackgroundColor White -ForegroundColor DarkGreen
+ foreach( $ll in $ctx.Web.Lists){
+ $ctx.Load($ll.ContentTypes)
-
+ try{
+ $ctx.ExecuteQuery()
+ }
+ catch{
+ }
- Write-Host $ll.Title -ForegroundColor Green
-
- foreach($cc in $ll.ContentTypes)
- {
- Write-Output $cc.Name
- }
+ Write-Host $ll.Title -ForegroundColor Green
-
-
+ foreach($cc in $ll.ContentTypes){
+ Write-Output $cc.Name
+ }
-
-
- }
-
-
-
- }
-
-
-
-
-
+ }
+}
+
# Paths to SDK. Please verify location on your computer.
@@ -71,4 +48,4 @@ $AdminPassword=Read-Host -Prompt "Password" -AsSecureString
$AdminUrl="https://tenant.sharepoint.com/sites/teamsitewithlibraries"
-Get-SPOList -Username $Username -AdminPassword $AdminPassword -Url $AdminUrl
\ No newline at end of file
+Get-SPOList -Username $Username -AdminPassword $AdminPassword -Url $AdminUrl
diff --git a/Items Management/Attachments/Enable or disable attachments to items of a chosen list/ListAttachments.ps1 b/Items Management/Attachments/Enable or disable attachments to items of a chosen list/ListAttachments.ps1
index 275e2759..874aabc2 100644
--- a/Items Management/Attachments/Enable or disable attachments to items of a chosen list/ListAttachments.ps1
+++ b/Items Management/Attachments/Enable or disable attachments to items of a chosen list/ListAttachments.ps1
@@ -1,57 +1,49 @@
-
+
#
# Created by Arleta Wanat, 2015
#
-function Set-SPOList
-{
-param (
+function Set-SPOList{
+ param (
[Parameter(Mandatory=$true,Position=0)]
- [string]$ListName,
+ [string]$ListName,
[Parameter(Mandatory=$true,Position=1)]
- [bool]$Attachments
- )
+ [bool]$Attachments
+ )
-$ll=$ctx.Web.Lists.GetByTitle($ListName)
+ $ll=$ctx.Web.Lists.GetByTitle($ListName)
-$ll.EnableAttachments = $Attachments
- $ll.Update()
+ $ll.EnableAttachments = $Attachments
+ $ll.Update()
- try
- {
+ try{
$ctx.ExecuteQuery()
Write-Host "Done" -ForegroundColor Green
- }
-
- catch [Net.WebException]
- {
-
- Write-Host "Failed" $_.Exception.ToString() -ForegroundColor Red
- }
-
-
+ }
+ catch [Net.WebException] {
+ Write-Host "Failed" $_.Exception.ToString() -ForegroundColor Red
+ }
}
-function Connect-SPOCSOM
-{
- param (
- [Parameter(Mandatory=$true,Position=1)]
+function Connect-SPOCSOM{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$AdminPassword,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url
-)
+ )
-$password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
+ $password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
$ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
$ctx.ExecuteQuery()
-$global:ctx=$ctx
+ $global:ctx=$ctx
}
@@ -78,4 +70,4 @@ $Attachments =$true
Connect-SPOCSOM -Username $Username -AdminPassword $AdminPassword -Url $Url
-Set-SPOList -ListName $ListName -Attachments $Attachments
\ No newline at end of file
+Set-SPOList -ListName $ListName -Attachments $Attachments
diff --git a/Items Management/Attachments/Enable or disable attachments to items of a chosen list/description.md b/Items Management/Attachments/Enable or disable attachments to items of a chosen list/description.md
index e17f799d..ae4331ff 100644
--- a/Items Management/Attachments/Enable or disable attachments to items of a chosen list/description.md
+++ b/Items Management/Attachments/Enable or disable attachments to items of a chosen list/description.md
@@ -1,22 +1,10 @@
-A short Powershell script to set the EnableAttachments property for a SharePoint Online list. The property is responsible for the Attach File icon under new item tab. If you disable the button, you and your users will not be able to add the attachments to list items.
+A short Powershell script to set the EnableAttachments property for a SharePoint Online list. The property is responsible for the **Attach File** icon under **new item** tab. If you disable the button, you and your users will not be able to add the attachments to list items.
-A short Powershell script to set the EnableAttachments property for a SharePoint Online list. The property is responsible for the Attach File icon under new item tab (see screenshot). The button allows you to add attachments to the list item.
-
-
-
-
-
-
-
-
+
If you disable the button, you and your users will not be able to add the attachments to list items:
-
-
-
-
-
+
Applies to lists.
@@ -24,7 +12,7 @@ Applies to lists.
-It requires installed SharePoint Online SDK
+It requires installed [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038)
You have to enter the list information before running the script:
@@ -45,18 +33,14 @@ $ListName="Tasks list"
$Attachments =$false
```
-### Related scripts
-Set direction of the reading order for a single list
+## **Related scripts**
+[Set direction of the reading order for a single list](https://gallery.technet.microsoft.com/office/Set-the-direction-of-the-f17ca66a)
-Set-SPOList properties (module)
-
-
-
-
+[Set-SPOList properties (module)](https://gallery.technet.microsoft.com/office/Set-SPOList-properties-9d16f2ba)
-### Related article
+## **Related article**
-SharePoint Online: Disable or enable attachments to list items using Powershell
+[SharePoint Online: Disable or enable attachments to list items using Powershell](https://social.technet.microsoft.com/wiki/contents/articles/30024.sharepoint-online-disable-or-enable-attachments-to-list-items-using-powershell.aspx)
diff --git a/Tenant Settings/Add BCC to all sharing invitations in OneDrive for Business/BccExternalSharingInvitations.ps1 b/Tenant Settings/Add BCC to all sharing invitations in OneDrive for Business/BccExternalSharingInvitations.ps1
index d7993850..c143e6dd 100644
--- a/Tenant Settings/Add BCC to all sharing invitations in OneDrive for Business/BccExternalSharingInvitations.ps1
+++ b/Tenant Settings/Add BCC to all sharing invitations in OneDrive for Business/BccExternalSharingInvitations.ps1
@@ -1,48 +1,35 @@
-function Set-SPOTenant
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SPOTenant{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [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
-
+ )
+
+ $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
\ No newline at end of file
+Set-SPOTenant -Username $username -Url $Url -password $AdminPassword
diff --git a/Tenant Settings/Add BCC to all sharing invitations in OneDrive for Business/description.md b/Tenant Settings/Add BCC to all sharing invitations in OneDrive for Business/description.md
index 1cc60d1b..a4152221 100644
--- a/Tenant Settings/Add BCC to all sharing invitations in OneDrive for Business/description.md
+++ b/Tenant Settings/Add BCC to all sharing invitations in OneDrive for Business/description.md
@@ -1,20 +1,18 @@
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?
-How to use?
-Download and open the .ps1 file.
-Add correct SharePoint Online SDK libraries:
+- Download and open the .ps1 file.
+- Add correct SharePoint Online SDK libraries:
-PowerShell
+```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
+```
+- 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}
@@ -23,20 +21,9 @@ PowerShell
$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
$username="admin@TENANT.onmicrosoft.com"
$Url="https://TENANT-admin.sharepoint.com"
+ ```
+- Run the script
- 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/Tenant Settings/Allow external sharing only with specific domains/SharingAllowedDomainList.ps1 b/Tenant Settings/Allow external sharing only with specific domains/SharingAllowedDomainList.ps1
index 8a5388a3..6d2520cc 100644
--- a/Tenant Settings/Allow external sharing only with specific domains/SharingAllowedDomainList.ps1
+++ b/Tenant Settings/Allow external sharing only with specific domains/SharingAllowedDomainList.ps1
@@ -1,50 +1,38 @@
-function Set-SiteColl
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SiteColl{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
+ [Parameter(Mandatory=$true,Position=4)]
$AllowDomainList
- )
-
-
- $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.SharingDomainRestrictionMode=[Microsoft.Online.SharePoint.TenantManagement.SharingDomainRestrictionModes]::AllowList
- $spoTenant.SharingAllowedDomainList=$AllowDomainList
- $ctx.Load($spoTenant)
- $ctx.ExecuteQuery()
- Write-Output $spoTenant
-
+ )
+
+ $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.SharingDomainRestrictionMode=[Microsoft.Online.SharePoint.TenantManagement.SharingDomainRestrictionModes]::AllowList
+ $spoTenant.SharingAllowedDomainList=$AllowDomainList
+ $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"
$AllowDomainList="test.com madeup.com"
-
-
-
-
-Set-SiteColl -Username $username -Url $Url -password $AdminPassword -AllowDomainList $AllowDomainList
\ No newline at end of file
+Set-SiteColl -Username $username -Url $Url -password $AdminPassword -AllowDomainList $AllowDomainList
diff --git a/Tenant Settings/Allow external sharing only with specific domains/description.md b/Tenant Settings/Allow external sharing only with specific domains/description.md
index 707c197e..c0257d59 100644
--- a/Tenant Settings/Allow external sharing only with specific domains/description.md
+++ b/Tenant Settings/Allow external sharing only with specific domains/description.md
@@ -2,22 +2,23 @@ Short Powershell script that limits external sharing in SharePoint Online to onl
-The script is related to and more described in a Wiki article SharePoint Online Sharing settings with CSOM.
+The script is related to and more described in a Wiki article [SharePoint Online Sharing settings with CSOM](https://social.technet.microsoft.com/wiki/contents/articles/39365.sharepoint-online-sharing-settings-with-csom).
-### How to use?
-Download and open the .ps1 file.
-Add correct libraries:
+## 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:
+- Enter the correct url and admin login:
```PowerShell
@@ -27,5 +28,5 @@ $username="admin@TENANT.onmicrosoft.com"
$Url="https://TENANT-admin.sharepoint.com"
$AllowDomainList="test.com madeup.com"
```
-Run the script
+- Run the script
diff --git a/Tenant Settings/Force external users to accept sharing invitations with the same account/RequireAcceptingAccountMatchInvitedAccount.ps1 b/Tenant Settings/Force external users to accept sharing invitations with the same account/RequireAcceptingAccountMatchInvitedAccount.ps1
index 49b50751..1b8470c6 100644
--- a/Tenant Settings/Force external users to accept sharing invitations with the same account/RequireAcceptingAccountMatchInvitedAccount.ps1
+++ b/Tenant Settings/Force external users to accept sharing invitations with the same account/RequireAcceptingAccountMatchInvitedAccount.ps1
@@ -1,49 +1,37 @@
-function Set-SiteColl
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SiteColl{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
- $RequireAcceptingAccountMatchInvitedAccount
- )
-
-
- $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.RequireAcceptingAccountMatchInvitedAccount=$RequireAcceptingAccountMatchInvitedAccount
- $ctx.Load($spoTenant)
- $ctx.ExecuteQuery()
- Write-Output $spoTenant
-
+ [Parameter(Mandatory=$true,Position=4)]
+ $RequireAcceptingAccountMatchInvitedAccount
+ )
+
+ $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.RequireAcceptingAccountMatchInvitedAccount=$RequireAcceptingAccountMatchInvitedAccount
+ $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"
$RequireAcceptingAccountMatchInvitedAccount=$true
-
-
-
-
-Set-SiteColl -Username $username -Url $Url -password $AdminPassword -RequireAcceptingAccountMatchInvitedAccount $RequireAcceptingAccountMatchInvitedAccount
\ No newline at end of file
+Set-SiteColl -Username $username -Url $Url -password $AdminPassword -RequireAcceptingAccountMatchInvitedAccount $RequireAcceptingAccountMatchInvitedAccount
diff --git a/Tenant Settings/Force external users to accept sharing invitations with the same account/description.md b/Tenant Settings/Force external users to accept sharing invitations with the same account/description.md
index 18904912..b960b28e 100644
--- a/Tenant Settings/Force external users to accept sharing invitations with the same account/description.md
+++ b/Tenant Settings/Force external users to accept sharing invitations with the same account/description.md
@@ -2,28 +2,29 @@ Short PowerShell script to force external users to accept sharing invitations wi
It is one of the 3 additional settings:
-Limit external sharing using domains
-Prevent external users from sharing files, folders, and sites that they don’t own
-External users must accept sharing invitations using the same account that the invitations were sent to
+- Limit external sharing using domains
+- Prevent external users from sharing files, folders, and sites that they don’t own
+- External users must accept sharing invitations using the same account that the invitations were sent to
-The script is related to and more described in a Wiki article SharePoint Online Sharing settings with CSOM.
+The script is related to and more described in a Wiki article [SharePoint Online Sharing settings with CSOM](https://social.technet.microsoft.com/wiki/contents/articles/39365.sharepoint-online-sharing-settings-with-csom).
-
+
### How to use?
-Download and open the .ps1 file.
-Add correct libraries:
+
+- 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:
-
+```
+- Enter the correct url and admin login:
```PowerShell
#Enter the data
@@ -31,4 +32,5 @@ $AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
$username="admin@TENANT.onmicrosoft.com"
$Url="https://TENANT-admin.sharepoint.com"
$RequireAcceptingAccountMatchInvitedAccount=$true
-``` Run the script
+```
+- Run the script
diff --git a/Tenant Settings/Get SharePoint Online tenant properties using Powershell and CSOM/README.md b/Tenant Settings/Get SharePoint Online tenant properties using Powershell and CSOM/README.md
index 2bc03c88..bd1e3b59 100644
--- a/Tenant Settings/Get SharePoint Online tenant properties using Powershell and CSOM/README.md
+++ b/Tenant Settings/Get SharePoint Online tenant properties using Powershell and CSOM/README.md
@@ -152,22 +152,15 @@ ServerObjectIsNull : False
TypedObject
-
-
-
-
- Expected results
+## Expected results
-
-
-
+
-
+## How to use?
-### How to use?
-Download and open the .ps1 file.
-Add correct libraries:
+- Download and open the .ps1 file.
+- Add correct libraries:
```PowerShell
@@ -175,7 +168,7 @@ Add correct libraries:
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:
+- Enter the correct url and admin login:
```PowerShell
@@ -185,5 +178,5 @@ $Url="https://TENANT-admin.sharepoint.com"
```
- Run the script
+- Run the script
diff --git a/Tenant Settings/Get SharePoint Online tenant properties using Powershell and CSOM/tenantProps.ps1 b/Tenant Settings/Get SharePoint Online tenant properties using Powershell and CSOM/tenantProps.ps1
index 91bf582e..5288f776 100644
--- a/Tenant Settings/Get SharePoint Online tenant properties using Powershell and CSOM/tenantProps.ps1
+++ b/Tenant Settings/Get SharePoint Online tenant properties using Powershell and CSOM/tenantProps.ps1
@@ -1,43 +1,33 @@
-function Get-SiteColl
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Get-SiteColl{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [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()
- $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()
-
- Write-Output $spoTenant
+ $spoTenant= New-Object Microsoft.Online.SharePoint.TenantAdministration.Tenant($Ctx)
+ $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"
#Microsoft.Online.SharePoint.TenantAdministration.SiteProperties.AllowLimitedAccess
-
#Enter the data
$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
$username="admin@TENANT.onmicrosoft.com"
$Url="https://TENANT-admin.sharepoint.com"
-
-
-
-Get-SiteColl -Username $username -Url $Url -password $AdminPassword
\ No newline at end of file
+Get-SiteColl -Username $username -Url $Url -password $AdminPassword
diff --git a/Tenant Settings/Hide OneDrive for Business Sync button using PS and CSOM/HideSyncButtonOnODB.ps1 b/Tenant Settings/Hide OneDrive for Business Sync button using PS and CSOM/HideSyncButtonOnODB.ps1
index 9a4926cd..6e40036d 100644
--- a/Tenant Settings/Hide OneDrive for Business Sync button using PS and CSOM/HideSyncButtonOnODB.ps1
+++ b/Tenant Settings/Hide OneDrive for Business Sync button using PS and CSOM/HideSyncButtonOnODB.ps1
@@ -1,48 +1,37 @@
-function Set-SPOTenant
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SPOTenant{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
+ [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
-
+ )
+
+ $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
\ No newline at end of file
+Set-SPOTenant -Username $username -Url $Url -password $AdminPassword -HideSyncButtonOnODB $HideSyncButtonOnODB
diff --git a/Tenant Settings/Hide OneDrive for Business Sync button using PS and CSOM/description.md b/Tenant Settings/Hide OneDrive for Business Sync button using PS and CSOM/description.md
index 92bd29fa..d2189e8a 100644
--- a/Tenant Settings/Hide OneDrive for Business Sync button using PS and CSOM/description.md
+++ b/Tenant Settings/Hide OneDrive for Business Sync button using PS and CSOM/description.md
@@ -8,23 +8,19 @@ 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:
-
+- 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:
-
+```
+
+- 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
@@ -34,6 +30,5 @@ $Url="https://TENANT-admin.sharepoint.com"
$HideSyncButtonOnODB=$true #Whether the sync button should be hidden
```
-
- Run the script
+- Run the script
diff --git a/Tenant Settings/Modify external sharing setting/SharingCapability.ps1 b/Tenant Settings/Modify external sharing setting/SharingCapability.ps1
index 51542efa..f59c6674 100644
--- a/Tenant Settings/Modify external sharing setting/SharingCapability.ps1
+++ b/Tenant Settings/Modify external sharing setting/SharingCapability.ps1
@@ -1,50 +1,38 @@
-function Set-SiteColl
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SiteColl{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
- $SharingCapability
- )
-
-
- $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.SharingCapability=[Microsoft.Online.SharePoint.TenantManagement.SharingCapabilities]::$SharingCapability
- $ctx.Load($spoTenant)
- $ctx.ExecuteQuery()
- Write-Output $spoTenant
-
+ [Parameter(Mandatory=$true,Position=4)]
+ $SharingCapability
+ )
+
+ $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.SharingCapability=[Microsoft.Online.SharePoint.TenantManagement.SharingCapabilities]::$SharingCapability
+ $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"
$SharingCapability="Disabled" # Disabled, ExternalUserSharingOnly, ExternalUserAndGuestSharing, ExistingExternalUserSharingOnly
-
-
-
-
-Set-SiteColl -Username $username -Url $Url -password $AdminPassword -SharingCapability $SharingCapability
\ No newline at end of file
+Set-SiteColl -Username $username -Url $Url -password $AdminPassword -SharingCapability $SharingCapability
diff --git a/Tenant Settings/Modify external sharing setting/description.md b/Tenant Settings/Modify external sharing setting/description.md
index 03e80910..6c4018ca 100644
--- a/Tenant Settings/Modify external sharing setting/description.md
+++ b/Tenant Settings/Modify external sharing setting/description.md
@@ -5,27 +5,22 @@ It requires SharePoint Online SDK.
The script is part of and more described in a TechNet Wiki [SharePoint Online Sharing settings with CSOM](https://social.technet.microsoft.com/wiki/contents/articles/39365.sharepoint-online-sharing-settings-with-csom.aspx?Sort=MostRecent&PageIndex=1) article.
+## How to use?
+- Download and open the .ps1 file.
+- Add correct libraries:
-
-
-
-
-
-###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:
+```
+- 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"
$SharingCapability="Disabled" # Disabled, ExternalUserSharingOnly, ExternalUserAndGuestSharing, ExistingExternalUserSharingOnly
-```Run the script
+```
+- Run the script
diff --git a/Tenant Settings/Notify OneDrive for Business owner if anonymous link to their content is created/OwnerAnonymousNotification.ps1 b/Tenant Settings/Notify OneDrive for Business owner if anonymous link to their content is created/OwnerAnonymousNotification.ps1
index 6afcce9e..23282e52 100644
--- a/Tenant Settings/Notify OneDrive for Business owner if anonymous link to their content is created/OwnerAnonymousNotification.ps1
+++ b/Tenant Settings/Notify OneDrive for Business owner if anonymous link to their content is created/OwnerAnonymousNotification.ps1
@@ -1,41 +1,33 @@
-function Set-SPOTenant
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SPOTenant{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
+ [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
-
+ )
+
+ $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
@@ -43,7 +35,4 @@ $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
\ No newline at end of file
+Set-SPOTenant -Username $username -Url $Url -password $AdminPassword -OwnerAnonymousNotification $OwnerAnonymousNotification
diff --git a/Tenant Settings/Notify OneDrive for Business owner if anonymous link to their content is created/description.md b/Tenant Settings/Notify OneDrive for Business owner if anonymous link to their content is created/description.md
index 626a5826..09e4549a 100644
--- a/Tenant Settings/Notify OneDrive for Business owner if anonymous link to their content is created/description.md
+++ b/Tenant Settings/Notify OneDrive for Business owner if anonymous link to their content is created/description.md
@@ -1,22 +1,22 @@
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
+[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:
-
+## 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:
-Enter the correct url and admin login:
```PowerShell
#Enter the data
$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
@@ -25,5 +25,4 @@ $Url="https://TENANT-admin.sharepoint.com"
$OwnerAnonymousNotification=$true #Whether ODB owner should be notified when anonymous link is created or changed
```
-
- Run the script
+- Run the script
diff --git a/Tenant Settings/Notify OneDrive for Business owner if their content is reshared/NotifyOwnersWhenItemsReshared.ps1 b/Tenant Settings/Notify OneDrive for Business owner if their content is reshared/NotifyOwnersWhenItemsReshared.ps1
index 7db9720c..7bf757ae 100644
--- a/Tenant Settings/Notify OneDrive for Business owner if their content is reshared/NotifyOwnersWhenItemsReshared.ps1
+++ b/Tenant Settings/Notify OneDrive for Business owner if their content is reshared/NotifyOwnersWhenItemsReshared.ps1
@@ -1,48 +1,37 @@
-function Set-SPOTenant
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SPOTenant{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
+ [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
-
+ )
+
+ $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
\ No newline at end of file
+Set-SPOTenant -Username $username -Url $Url -password $AdminPassword -NotifyOwnersWhenItemsReshared $NotifyOwnersWhenItemsReshared
diff --git a/Tenant Settings/Notify OneDrive for Business owner if their content is reshared/description.md b/Tenant Settings/Notify OneDrive for Business owner if their content is reshared/description.md
index 7433eab2..a7c3e28e 100644
--- a/Tenant Settings/Notify OneDrive for Business owner if their content is reshared/description.md
+++ b/Tenant Settings/Notify OneDrive for Business owner if their content is reshared/description.md
@@ -2,23 +2,20 @@ Short Powershell script that enables or disables a setting to send emails to One
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
+[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?
-
-
-### How to use?
-Download and open the .ps1 file.
-Add correct libraries:
-
+- 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:
-
+```
+
+- ter the correct url and admin login:
```PowerShell
#Enter the data
@@ -28,4 +25,4 @@ $Url="https://TENANT-admin.sharepoint.com"
$NotifyOwnersWhenItemsReshare=$true #Whether ODB owner should be notified the content is reshared with external users
```
- Run the script
+- Run the script
diff --git a/Tenant Settings/Prevent external users from resharing/PreventExternalUsersFromResharing.ps1 b/Tenant Settings/Prevent external users from resharing/PreventExternalUsersFromResharing.ps1
index 763cc092..13ea638e 100644
--- a/Tenant Settings/Prevent external users from resharing/PreventExternalUsersFromResharing.ps1
+++ b/Tenant Settings/Prevent external users from resharing/PreventExternalUsersFromResharing.ps1
@@ -1,40 +1,32 @@
-function Set-SiteColl
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SiteColl{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
- $PreventExternalUsersFromResharing
- )
-
-
- $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.PreventExternalUsersFromResharing=$PreventExternalUsersFromResharing
- $ctx.Load($spoTenant)
- $ctx.ExecuteQuery()
- Write-Output $spoTenant
-
+ [Parameter(Mandatory=$true,Position=4)]
+ $PreventExternalUsersFromResharing
+ )
+
+ $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.PreventExternalUsersFromResharing=$PreventExternalUsersFromResharing
+ $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
@@ -42,8 +34,4 @@ $username="admin@TENANT.onmicrosoft.com"
$Url="https://TENANT-admin.sharepoint.com"
$PreventExternalUsersFromResharing=$true
-
-
-
-
-Set-SiteColl -Username $username -Url $Url -password $AdminPassword -PreventExternalUsersFromResharing $PreventExternalUsersFromResharing
\ No newline at end of file
+Set-SiteColl -Username $username -Url $Url -password $AdminPassword -PreventExternalUsersFromResharing $PreventExternalUsersFromResharing
diff --git a/Tenant Settings/Prevent external users from resharing/description.md b/Tenant Settings/Prevent external users from resharing/description.md
index ee55c795..abd5f1a8 100644
--- a/Tenant Settings/Prevent external users from resharing/description.md
+++ b/Tenant Settings/Prevent external users from resharing/description.md
@@ -2,31 +2,26 @@ Short PowerShell script to prevent external users from sharing files, folders, a
It is one of the 3 additional settings:
-Limit external sharing using domains
-Prevent external users from sharing files, folders, and sites that they don’t own
-External users must accept sharing invitations using the same account that the invitations were sent to
+- Limit external sharing using domains
+- Prevent external users from sharing files, folders, and sites that they don’t own
+- External users must accept sharing invitations using the same account that the invitations were sent to
+
-
-
-The script is related to and more described in a Wiki article SharePoint Online Sharing settings with CSOM.
+The script is related to and more described in a Wiki article [SharePoint Online Sharing settings with CSOM](https://social.technet.microsoft.com/wiki/contents/articles/39365.sharepoint-online-sharing-settings-with-csom).
-
+## How to use?
-How to use?
-Download and open the .ps1 file.
-Add correct libraries:
+- 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:
-
+- Enter the correct url and admin login:
```PowerShell
#Enter the data
@@ -35,8 +30,7 @@ $username="admin@TENANT.onmicrosoft.com"
$Url="https://TENANT-admin.sharepoint.com"
$PreventExternalUsersFromResharing=$true
```
-
- Run the script
+- Run the script
diff --git a/Tenant Settings/Set Anonymous access for SPO tenant using PS and CSOM/SetAnonymousAccess.ps1 b/Tenant Settings/Set Anonymous access for SPO tenant using PS and CSOM/SetAnonymousAccess.ps1
index 7e563b89..c296d84d 100644
--- a/Tenant Settings/Set Anonymous access for SPO tenant using PS and CSOM/SetAnonymousAccess.ps1
+++ b/Tenant Settings/Set Anonymous access for SPO tenant using PS and CSOM/SetAnonymousAccess.ps1
@@ -1,45 +1,37 @@
-function Set-SiteColl
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SiteColl{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
+ [Parameter(Mandatory=$true,Position=4)]
[string]$LinkType,
- [Parameter(Mandatory=$true,Position=5)]
+ [Parameter(Mandatory=$true,Position=5)]
[string]$FolderLinkType
- )
-
-
- $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.SharingCapability=[Microsoft.Online.SharePoint.TenantManagement.SharingCapabilities]::ExternalUserAndGuestSharing
- $spoTenant.FileAnonymousLinkType=[Microsoft.SharePoint.Client.AnonymousLinkType]::$LinkType
- $spoTenant.FolderAnonymousLinkType=$FolderLinkType
- $ctx.Load($spoTenant)
- $ctx.ExecuteQuery()
- Write-Output $spoTenant
-
+ )
+
+ $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.SharingCapability=[Microsoft.Online.SharePoint.TenantManagement.SharingCapabilities]::ExternalUserAndGuestSharing
+ $spoTenant.FileAnonymousLinkType=[Microsoft.SharePoint.Client.AnonymousLinkType]::$LinkType
+ $spoTenant.FolderAnonymousLinkType=$FolderLinkType
+ $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"
@@ -47,6 +39,4 @@ $Url="https://TENANT-admin.sharepoint.com"
$LinkType="View" #Edit, View or None
$FolderLinkType="Edit" # View or Edit
-
-
-Set-SiteColl -Username $username -Url $Url -password $AdminPassword -LinkType $LinkType -FolderLinkType $FolderLinkType
\ No newline at end of file
+Set-SiteColl -Username $username -Url $Url -password $AdminPassword -LinkType $LinkType -FolderLinkType $FolderLinkType
diff --git a/Tenant Settings/Set Anonymous access for SPO tenant using PS and CSOM/description.md b/Tenant Settings/Set Anonymous access for SPO tenant using PS and CSOM/description.md
index 98555208..b7536e6e 100644
--- a/Tenant Settings/Set Anonymous access for SPO tenant using PS and CSOM/description.md
+++ b/Tenant Settings/Set Anonymous access for SPO tenant using PS and CSOM/description.md
@@ -6,39 +6,33 @@ For folders you can choose between View and Edit.
For files you can choose between
-Edit - anonymous links will allow to edit documents
+**Edit** - anonymous links will allow to edit documents
-View - anonymous links will allow only to view documents
+**View** - anonymous links will allow only to view documents
-None - users can decide about the access level on per-document basis (no global setting)
+**None** - users can decide about the access level on per-document basis (no global setting)
-The script is related to and more described in a Wiki article SharePoint Online Sharing settings with CSOM.
+The script is related to and more described in a Wiki article [SharePoint Online Sharing settings with CSOM](https://social.technet.microsoft.com/wiki/contents/articles/39365.sharepoint-online-sharing-settings-with-csom).
It requires SharePoint Online SDK.
-
-
-
+## How to use?
-### How to use?
-Download and open the .ps1 file.
-Add correct libraries:
+- 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:
+- Enter the correct url and admin login:
-
```PowerShell
#Enter the data
$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
@@ -47,5 +41,5 @@ $Url="https://TENANT-admin.sharepoint.com"
$LinkType="View" #Edit, View or None
$FolderLinkType="Edit" # View or Edit
```
-Run the script
+- Run the script
diff --git a/Tenant Settings/Set anonymous link access level for SPO tenant/AnonymousLinkType.ps1 b/Tenant Settings/Set anonymous link access level for SPO tenant/AnonymousLinkType.ps1
index 1f8d950a..27bfbc11 100644
--- a/Tenant Settings/Set anonymous link access level for SPO tenant/AnonymousLinkType.ps1
+++ b/Tenant Settings/Set anonymous link access level for SPO tenant/AnonymousLinkType.ps1
@@ -1,48 +1,37 @@
-function Set-SiteColl
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SiteColl{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
+ [Parameter(Mandatory=$true,Position=4)]
[string]$LinkType
- )
-
-
- $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.FileAnonymousLinkType=[Microsoft.SharePoint.Client.AnonymousLinkType]::$LinkType
- $ctx.Load($spoTenant)
- $ctx.ExecuteQuery()
- Write-Output $spoTenant
-
+ )
+
+ $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.FileAnonymousLinkType=[Microsoft.SharePoint.Client.AnonymousLinkType]::$LinkType
+ $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"
$LinkType="View" #Edit, View or None
-
-
-
-Set-SiteColl -Username $username -Url $Url -password $AdminPassword -LinkType $LinkType
\ No newline at end of file
+Set-SiteColl -Username $username -Url $Url -password $AdminPassword -LinkType $LinkType
diff --git a/Tenant Settings/Set anonymous link access level for SPO tenant/description.md b/Tenant Settings/Set anonymous link access level for SPO tenant/description.md
index f7779f59..05a6237f 100644
--- a/Tenant Settings/Set anonymous link access level for SPO tenant/description.md
+++ b/Tenant Settings/Set anonymous link access level for SPO tenant/description.md
@@ -1,36 +1,27 @@
After you have enabled anonymous links for SharePoint Online tenant, you can set what access level the links can give: edit or only view. The setting is global for the entire tenant. You can choose between
-Edit - anonymous links will allow to edit documents
+**Edit** - anonymous links will allow to edit documents
-View - anonymous links will allow only to view documents
+**View** - anonymous links will allow only to view documents
-None - users can decide about the access level on per-document basis (no global setting)
+**None** - users can decide about the access level on per-document basis (no global setting)
-
-
-
-
-The script is related to and more described in a Wiki article SharePoint Online Sharing settings with CSOM.
+The script is related to and more described in a Wiki article [SharePoint Online Sharing settings with CSOM](https://social.technet.microsoft.com/wiki/contents/articles/39365.sharepoint-online-sharing-settings-with-csom).
It requires SharePoint Online SDK.
+## How to use?
+- Download and open the ```.ps1``` file.
+- Add correct libraries:
-
-
-
-### 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:
-Enter the correct url and admin login:
```PowerShell
#Enter the data
$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
@@ -38,4 +29,4 @@ $username="admin@TENANT.onmicrosoft.com"
$Url="https://TENANT-admin.sharepoint.com"
$LinkType="View" #Edit, View or None
```
-Run the script
+- Run the script
diff --git a/Tenant Settings/Set default link type for SharePoint Online tenant sharing settings/SharingLinkType.ps1 b/Tenant Settings/Set default link type for SharePoint Online tenant sharing settings/SharingLinkType.ps1
index 1647645a..52d54c73 100644
--- a/Tenant Settings/Set default link type for SharePoint Online tenant sharing settings/SharingLinkType.ps1
+++ b/Tenant Settings/Set default link type for SharePoint Online tenant sharing settings/SharingLinkType.ps1
@@ -1,49 +1,37 @@
-function Set-SiteColl
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SiteColl{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
+ [Parameter(Mandatory=$true,Position=4)]
$SharingLinkType
- )
-
-
- $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.DefaultSharingLinkType= [Microsoft.Online.SharePoint.TenantManagement.SharingLinkType]::$SharingLinkType
- $ctx.Load($spoTenant)
- $ctx.ExecuteQuery()
- Write-Output $spoTenant
-
+ )
+
+ $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.DefaultSharingLinkType= [Microsoft.Online.SharePoint.TenantManagement.SharingLinkType]::$SharingLinkType
+ $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"
$SharingLinkType="None" #None, Direct, Internal, AnonymousAccess
-
-
-
-
-Set-SiteColl -Username $username -Url $Url -password $AdminPassword -SharingLinkType $SharingLinkType
\ No newline at end of file
+Set-SiteColl -Username $username -Url $Url -password $AdminPassword -SharingLinkType $SharingLinkType
diff --git a/Tenant Settings/Set default link type for SharePoint Online tenant sharing settings/description.md b/Tenant Settings/Set default link type for SharePoint Online tenant sharing settings/description.md
index bb6c5269..3b09c653 100644
--- a/Tenant Settings/Set default link type for SharePoint Online tenant sharing settings/description.md
+++ b/Tenant Settings/Set default link type for SharePoint Online tenant sharing settings/description.md
@@ -1,37 +1,24 @@
Short Powershell script to modify the Sharing Link Type setting in SharePoint Admin Center via DefaultSharingLinkType property of Tenant object
-
-
The setting can be changed also via SharePoint Admin Center:
+
+The script is related to and more described in a Wiki article [SharePoint Online Sharing settings with CSOM](https://social.technet.microsoft.com/wiki/contents/articles/39365.sharepoint-online-sharing-settings-with-csom).
-
-
-The script is related to and more described in a Wiki article SharePoint Online Sharing settings with CSOM.
-
-
-
-
+## How to use?
-How to use?
-Download and open the .ps1 file.
-Add correct libraries:
+- 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:
-
-
-
-Enter the correct url and admin login:
-
-
```PowerShell
#Enter the data
$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
@@ -39,6 +26,5 @@ $username="admin@TENANT.onmicrosoft.com"
$Url="https://TENANT-admin.sharepoint.com"
$SharingLinkType="None" #None, Direct, Internal, AnonymousAccess
```
-
- Run the script
+- Run the script
diff --git a/Tenant Settings/Set expiration for anonymous links in SPO/SetExpirationForAnonymousLinks (1).ps1 b/Tenant Settings/Set expiration for anonymous links in SPO/SetExpirationForAnonymousLinks (1).ps1
index fc87dbfd..8213264c 100644
--- a/Tenant Settings/Set expiration for anonymous links in SPO/SetExpirationForAnonymousLinks (1).ps1
+++ b/Tenant Settings/Set expiration for anonymous links in SPO/SetExpirationForAnonymousLinks (1).ps1
@@ -1,48 +1,37 @@
-function Set-SiteColl
-{
-param (
- [Parameter(Mandatory=$true,Position=1)]
+function Set-SiteColl{
+ param (
+ [Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
[string]$Url,
- [Parameter(Mandatory=$true,Position=3)]
+ [Parameter(Mandatory=$true,Position=3)]
$password,
- [Parameter(Mandatory=$true,Position=4)]
+ [Parameter(Mandatory=$true,Position=4)]
[int]$HowManyDaysToExpire
- )
-
-
- $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.RequireAnonymousLinksExpireInDays=$HowManyDaysToExpire
- $ctx.Load($spoTenant)
- $ctx.ExecuteQuery()
- Write-Output $spoTenant
-
+ )
+
+ $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.RequireAnonymousLinksExpireInDays=$HowManyDaysToExpire
+ $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"
$HowManyDaysToExpire=17 #Choose 0 if the links should not expire
-
-
-
-Set-SiteColl -Username $username -Url $Url -password $AdminPassword -HowManyDaysToExpire $HowManyDaysToExpire
\ No newline at end of file
+Set-SiteColl -Username $username -Url $Url -password $AdminPassword -HowManyDaysToExpire $HowManyDaysToExpire
diff --git a/Tenant Settings/Set expiration for anonymous links in SPO/description.md b/Tenant Settings/Set expiration for anonymous links in SPO/description.md
index 45ac040e..563e99b8 100644
--- a/Tenant Settings/Set expiration for anonymous links in SPO/description.md
+++ b/Tenant Settings/Set expiration for anonymous links in SPO/description.md
@@ -2,27 +2,21 @@ After you have enabled anonymous links for SharePoint Online tenant, you can set
It requires SharePoint Online SDK.
-
-
-The script is related to and more described in a Wiki article SharePoint Online Sharing settings with CSOM.
+The script is related to and more described in a Wiki article [SharePoint Online Sharing settings with CSOM](https://social.technet.microsoft.com/wiki/contents/articles/39365.sharepoint-online-sharing-settings-with-csom).
-
+## How to use?
-How to use?
-Download and open the .ps1 file.
-Add correct libraries:
+- 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:
+- Enter the correct url and admin login:
-
```PowerShell
#Enter the data
$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
@@ -30,7 +24,6 @@ $username="admin@TENANT.onmicrosoft.com"
$Url="https://TENANT-admin.sharepoint.com"
$HowManyDaysToExpire=17 #Choose 0 if the links should not expire
```
-
-Run the script
+- Run the script