From 433ea99d6fea7545121d80dec9186dfafb24b594 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Mon, 13 Apr 2020 16:55:54 +0300
Subject: [PATCH 01/55] Update README.md
---
README.md | 96 ++++++++++++++++++++++++++++---------------------------
1 file changed, 49 insertions(+), 47 deletions(-)
diff --git a/README.md b/README.md
index 42fb5f28..cfcf3d53 100644
--- a/README.md
+++ b/README.md
@@ -11,29 +11,6 @@ The scripts use Powershell, C#, CSOM and REST. They include copies of existing s
Most of them were tested and verified by hundreds and thousands of users of [Technet Gallery, where you can still find these scripts](https://gallery.technet.microsoft.com/office/site/search?f%5B0%5D.Type=User&f%5B0%5D.Value=Arleta%20Wanat)
-You can find here script samples to:
-* enable, modify and change versioning settings, version numbers
-* set, modify and remove permissions
-* manage permission inheritance on list / folder or item level
-* get, set and report on content types
-* fix issues connected with content type removal, and bulk-remove them
-* modify and manipulate your item display forms
-* manage your files - move, copy across libraries and tenants, create reports on and generate randomized samples
-* copy structures across libraries, sites and tenants
-* move item attachments to another library
-* modify various list and library settings, e.g. reading order
-* check in and check out items, including bulk check in of checked out files
-* create columns, views, fix issues related to deleted/missing views
-* remove, modify fields
-* create OneDrive for Business storage reports
-* change time zones
-* get and delete page web parts
-* manipulate sites, subsites and their properties
-* report on and restore selected/all recycle bin items
-* set themes and get reports on workflows
-* There are also custom modules, for files/items or columns management cmdlets with tens of examples on how to use them available on [Technet Wiki](http://social.technet.microsoft.com/wiki/contents/articles/32334.sharepoint-online-spomod-resources.aspx)
-
-
Their new home at GitHub is still relatively recent, so if you find any issues, please do let me know. I appreciate every comment and every feedback.
@@ -412,30 +389,55 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
-* SiteMailboxes
-* Tenant Settings
-* Add BCC to all sharing invitations in OneDrive for Business
-* Allow external sharing only with specific domains
-* Block download of all files for guests in SharePoint with Powershell and CSOM
-* Force external users to accept sharing invitations with the same account
-* Get SharePoint Online tenant properties using Powershell and CSOM
-* Globally set OneDrive for Business Access Requests and Members Can Share
-* Hide OneDrive for Business Sync button using PS and CSOM
-* Modify external sharing setting
-* Notify OneDrive for Business owner if anonymous link to their content is created
-* Notify OneDrive for Business owner if their content is reshared
-* Prevent external users from resharing
-* Report on SharePoint Online tenant properties
-* Set Anonymous access for SPO tenant using PS and CSOM
-* Set anonymous link access level for SPO tenant
-* Set default link type for SharePoint Online tenant sharing settings
-* Set expiration for anonymous links in SPO
-* User Profiles
-* Export all user profiles using Powershell
-* Get all user profile properties using Powershell and REST
-* Get MUI Languages for multiple users using REST
-* Get user work email using Powershell and REST
-* Retrieve all user profiles and their properties using C# and CSOM
+
+ SiteMailboxes
+
+
+
+
+
+ Tenant Settings
+
+
+
+ * Add BCC to all sharing invitations in OneDrive for Business
+ * Allow external sharing only with specific domains
+ * Block download of all files for guests in SharePoint with Powershell and CSOM
+ * Force external users to accept sharing invitations with the same account
+ * Get SharePoint Online tenant properties using Powershell and CSOM
+ * Globally set OneDrive for Business Access Requests and Members Can Share
+ * Hide OneDrive for Business Sync button using PS and CSOM
+ * Modify external sharing setting
+ * Notify OneDrive for Business owner if anonymous link to their content is created
+ * Notify OneDrive for Business owner if their content is reshared
+ * Prevent external users from resharing
+ * Report on SharePoint Online tenant properties
+ * Set Anonymous access for SPO tenant using PS and CSOM
+ * Set anonymous link access level for SPO tenant
+ * Set default link type for SharePoint Online tenant sharing settings
+ * Set expiration for anonymous links in SPO
+
+
+
+
+ User Profiles
+
+
+ * Export all user profiles using Powershell
+ * Get all user profile properties using Powershell and REST
+ * Get MUI Languages for multiple users using REST
+ * Get user work email using Powershell and REST
+ * Retrieve all user profiles and their properties using C# and CSOM
+
+
+
+
* Versioning
* Create a report on all file versions in OneDrive for Business
* Enable minor versions for all lists
From 98be6322ddf4b395749323e338b8762a0dcefb97 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Mon, 13 Apr 2020 16:57:09 +0300
Subject: [PATCH 02/55] Update README.md
---
README.md | 4 ----
1 file changed, 4 deletions(-)
diff --git a/README.md b/README.md
index cfcf3d53..6f6e5166 100644
--- a/README.md
+++ b/README.md
@@ -53,8 +53,6 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
-
-
File Management
@@ -78,11 +76,9 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
* Undeclare files as records
* Restore previous versions in selected files the entire library
-
-* Versioning
+
+Versioning
+
+
* Create a report on all file versions in OneDrive for Business
* Enable minor versions for all lists
* Enable versioning for all lists in OneDrive sites
@@ -443,9 +447,19 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
* Restore previous versions in selected files the entire library
* Restore previous versions in the entire library
* Set the major version limit for all the lists and libraries (data loss involved)
-* Workflows
+
+
+
+
+Workflows
+
+
* Get workflow report for a site collection
* Get workflow report for all site collections
* Get workflow report for one site
-
+
+
From 5bd5638c48c48d6db3a086b011920985082eb404 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Fri, 17 Apr 2020 23:34:15 +0300
Subject: [PATCH 05/55] Create README.md
---
Workflows/README.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 Workflows/README.md
diff --git a/Workflows/README.md b/Workflows/README.md
new file mode 100644
index 00000000..9c558e35
--- /dev/null
+++ b/Workflows/README.md
@@ -0,0 +1 @@
+.
From aabd887ed20d6489ab6c849fa4ae3aa72ce192f1 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Sat, 18 Apr 2020 00:12:25 +0300
Subject: [PATCH 06/55] Create README.md
---
Versioning/README.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 Versioning/README.md
diff --git a/Versioning/README.md b/Versioning/README.md
new file mode 100644
index 00000000..9c558e35
--- /dev/null
+++ b/Versioning/README.md
@@ -0,0 +1 @@
+.
From 88d017c64f7447e55e95861f5c4fdd3a0465561f Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Sun, 19 Apr 2020 17:32:44 +0300
Subject: [PATCH 07/55] Update README.md
---
README.md | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/README.md b/README.md
index 0c71f26b..9ad76758 100644
--- a/README.md
+++ b/README.md
@@ -96,7 +96,7 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
-
+
+
Licensing
@@ -144,7 +144,7 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
+
Lists and Libraries Management
@@ -222,7 +222,7 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
+
Managed Metadata
@@ -234,7 +234,7 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
+
OneDrive for Business
@@ -255,7 +255,7 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
+
OTHER
@@ -271,7 +271,7 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
+
+
+
+
+
+
Tenant Settings
-
+
* Add BCC to all sharing invitations in OneDrive for Business
@@ -418,7 +418,7 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
+
User Profiles
@@ -432,7 +432,7 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
+
+
-
- * Create
- * Add Content Type to Lists with Workflows
- * Add Content Type to Task Lists
- * Add existing content type directly to SPO list
- * Create a content type
- * Create and add content type to a content type hub
- * Create content type and add directly to SPO list
- * Create content type and add it to all lists in one site
- * Get
- * All Content Types from a Content Type Hub and their DisplayFormTemplate
- * Compare Web.AvailableContentTypes vs Web.ContentTypes
- * Find content types added to your lists (recursive)
- * Find content types added to your lists
- * Get All Detailed Properties of All Content Types
- * Get All Hidden Content Types added to the site
- * Get All Properties of All Content Types in All Lists (Detailed) across one site
- * Get Content Types Derived From One Parent 2
- * Get Content Types Derived From One Parent
- *
- * Set
- * Add column (fieldlink) to a content type
- * Assign your Content Types back to their default Groups
- * Modify the description of a list content type
- * Modify the description of a site content type
- * Reset default content types
- * Unseal sealed content types in site
+
+* Content Type Management Setting
+ * Allow content type management for all lists in a site
+ * Allow content type management for all lists in site collection
+ * Set content type management setting for a single list
+* Create
+ * Add Content Type to Lists with Workflows
+ * Add Content Type to Task Lists
+ * Add existing content type directly to SPO list
+ * Create a content type
+ * Create and add content type to a content type hub
+ * Create content type and add directly to SPO list
+ * Create content type and add it to all lists in one site
+* Display Forms
+ * Find Custom Display Forms Deployed
+ * Modify the Display Form Template Name
+ * Unable to view items- modify the DisplayFormUrl back to default
+* Get
+ * All Content Types from a Content Type Hub and their DisplayFormTemplate
+ * Compare Web.AvailableContentTypes vs Web.ContentTypes
+ * Find content types added to your lists (recursive)
+ * Find content types added to your lists
+ * Get All Detailed Properties of All Content Types
+ * Get All Hidden Content Types added to the site
+ * Get All Properties of All Content Types in All Lists (Detailed) across one site
+ * Get Content Types Derived From One Parent 2
+ * Get Content Types Derived From One Parent
+ * Get Content Types with a particular column
+ * Get Names of All Content Types
+ * Get Names of all Available Content Types
+ * Get Names of all content types added to your lists
+ * Get Single Content Type - Array Method
+ * Get all columns associated to a SINGLE content type in a list
+ * Get all properties of all content types in a site
+ * Get content types belonging to a group
+ * Get content types which cannot be modified
+ * Get properties of a single content type by its ID
+ * Lists where a given content type is added
+ * Verify the content types used in your lists against the default ones
+* Set
+ * Add column (fieldlink) to a content type
+ * Assign your Content Types back to their default Groups
+ * Modify the description of a list content type
+ * Modify the description of a site content type
+ * Reset default content types
+ * Unseal sealed content types in site
+* Modules
+ * SharePoint Online module for managing content types
+* Remove
+ * Remove a content type from all lists in a site
+ * Remove content type from SharePoint site
+* Set
+ * Add column (fieldlink) to a content type
+ * Assign your Content Types back to their default Groups
+ * Modify the description of a list content type
+ * Modify the description of a site content type
+ * Reset default content types
+ * Unseal sealed content types in site
From 9cea9e90bc2c49e6b3f11a2e5c7e9fdc4699d299 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Thu, 30 Apr 2020 17:51:14 +0300
Subject: [PATCH 15/55] Update README.md
---
Content Types/README.md | 75 ++++++++++++++++++++++++++++++++++++-----
1 file changed, 66 insertions(+), 9 deletions(-)
diff --git a/Content Types/README.md b/Content Types/README.md
index 1e8a0309..923e30b9 100644
--- a/Content Types/README.md
+++ b/Content Types/README.md
@@ -1,10 +1,21 @@
INDEX
-* Content Type Management Setting
+Content Type Management Setting
+
+
+
* Allow content type management for all lists in a site
* Allow content type management for all lists in site collection
* Set content type management setting for a single list
-* Create
+
+ Create
+
+
+
* Add Content Type to Lists with Workflows
* Add Content Type to Task Lists
* Add existing content type directly to SPO list
@@ -12,11 +23,27 @@ INDEX
* Create and add content type to a content type hub
* Create content type and add directly to SPO list
* Create content type and add it to all lists in one site
-* Display Forms
+
+ Display Forms
+
+
+
* Find Custom Display Forms Deployed
* Modify the Display Form Template Name
* Unable to view items- modify the DisplayFormUrl back to default
-* Get
+
+ Get
+
+
+
* All Content Types from a Content Type Hub and their DisplayFormTemplate
* Compare Web.AvailableContentTypes vs Web.ContentTypes
* Find content types added to your lists (recursive)
@@ -38,19 +65,49 @@ INDEX
* Get properties of a single content type by its ID
* Lists where a given content type is added
* Verify the content types used in your lists against the default ones
-* Set
+
+ Set
+
+
+
* Add column (fieldlink) to a content type
* Assign your Content Types back to their default Groups
* Modify the description of a list content type
* Modify the description of a site content type
* Reset default content types
* Unseal sealed content types in site
-* Modules
+
+Modules
+
+
+
* SharePoint Online module for managing content types
-* Remove
+
+ Remove
+
+
+
* Remove a content type from all lists in a site
* Remove content type from SharePoint site
-* Set
+
+ Set
+
+
+
* Add column (fieldlink) to a content type
* Assign your Content Types back to their default Groups
* Modify the description of a list content type
@@ -59,4 +116,4 @@ INDEX
* Unseal sealed content types in site
-
+
+ Create
+
+
+ * Add Content Type to Lists with Workflows
+ * Add Content Type to Task Lists
+ * Add existing content type directly to SPO list
+ * Create a content type
+ * Create and add content type to a content type hub
+ * Create content type and add directly to SPO list
+ * Create content type and add it to all lists in one site
+
+ Display Forms
+
+
+
+ * Find Custom Display Forms Deployed
+ * Modify the Display Form Template Name
+ * Unable to view items- modify the DisplayFormUrl back to default
+
+
Content Type Management Setting
+
+
+
+ * Allow content type management for all lists in a site
+ * Allow content type management for all lists in site collection
+ * Set content type management setting for a single list
+
+ Create
@@ -47,25 +58,13 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
* Unable to view items- modify the DisplayFormUrl back to default
Get
+
+
+
* All Content Types from a Content Type Hub and their DisplayFormTemplate
* Compare Web.AvailableContentTypes vs Web.ContentTypes
* Find content types added to your lists (recursive)
@@ -87,26 +86,58 @@ Their new home at GitHub is still relatively recent, so if you find any issues,
* Get properties of a single content type by its ID
* Lists where a given content type is added
* Verify the content types used in your lists against the default ones
-* Set
+
+ Set
+
+
+
* Add column (fieldlink) to a content type
* Assign your Content Types back to their default Groups
* Modify the description of a list content type
* Modify the description of a site content type
* Reset default content types
* Unseal sealed content types in site
-* Modules
+
+Modules
+
+
+
* SharePoint Online module for managing content types
-* Remove
+
+ Remove
+
+
+
* Remove a content type from all lists in a site
* Remove content type from SharePoint site
-* Set
+
+ Set
+
+
+
* Add column (fieldlink) to a content type
* Assign your Content Types back to their default Groups
* Modify the description of a list content type
* Modify the description of a site content type
* Reset default content types
* Unseal sealed content types in site
-
+
+
+
From 0d54c65255c3d622e0a443fc1408e79ad5f059a7 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Sat, 2 May 2020 13:22:44 +0300
Subject: [PATCH 18/55] Create README.md
---
Power Automate/README.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 Power Automate/README.md
diff --git a/Power Automate/README.md b/Power Automate/README.md
new file mode 100644
index 00000000..9c558e35
--- /dev/null
+++ b/Power Automate/README.md
@@ -0,0 +1 @@
+.
From 38eb4cc2ce3df2ccd35ab8c66a441814cfc72313 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Sun, 3 May 2020 14:19:47 +0300
Subject: [PATCH 19/55] Create README.md
---
.../README.md | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 Power Automate/Disable Flows in all lists on SharePoint site/README.md
diff --git a/Power Automate/Disable Flows in all lists on SharePoint site/README.md b/Power Automate/Disable Flows in all lists on SharePoint site/README.md
new file mode 100644
index 00000000..20c7017b
--- /dev/null
+++ b/Power Automate/Disable Flows in all lists on SharePoint site/README.md
@@ -0,0 +1,33 @@
+Short Powershell script that disables flows for all lists and libraries in SharePoint Online modern site.
+
+It modifies DisableFlows property of a SharePoint Online site. The script is related to and more described in an article [Verifying and modifying Flows Policy in SharePoint Online site using Powershell](https://social.technet.microsoft.com/wiki/contents/articles/39331.sharepoint-online-verifying-and-modifying-flows-policy-in-site-using-powershell.aspx) on the TechNet Wiki.
+
+
+
+If the setting is set to disabled, the flows button will be missing on all lists and libraries in the site:
+
+
+
+
+### 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"
+$AdminUrl="https://TENANT-admin.sharepoint.com"
+$Url="https://TENANT.sharepoint.com"
+```
+- Run the script
+
+
+
From 69956c7dd386aa5f9a78b9d49dc6c944e7ae5914 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Sun, 3 May 2020 14:20:05 +0300
Subject: [PATCH 20/55] Delete description.md
---
.../description.md | 33 -------------------
1 file changed, 33 deletions(-)
delete mode 100644 Power Automate/Disable Flows in all lists on SharePoint site/description.md
diff --git a/Power Automate/Disable Flows in all lists on SharePoint site/description.md b/Power Automate/Disable Flows in all lists on SharePoint site/description.md
deleted file mode 100644
index 20c7017b..00000000
--- a/Power Automate/Disable Flows in all lists on SharePoint site/description.md
+++ /dev/null
@@ -1,33 +0,0 @@
-Short Powershell script that disables flows for all lists and libraries in SharePoint Online modern site.
-
-It modifies DisableFlows property of a SharePoint Online site. The script is related to and more described in an article [Verifying and modifying Flows Policy in SharePoint Online site using Powershell](https://social.technet.microsoft.com/wiki/contents/articles/39331.sharepoint-online-verifying-and-modifying-flows-policy-in-site-using-powershell.aspx) on the TechNet Wiki.
-
-
-
-If the setting is set to disabled, the flows button will be missing on all lists and libraries in the site:
-
-
-
-
-### 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"
-$AdminUrl="https://TENANT-admin.sharepoint.com"
-$Url="https://TENANT.sharepoint.com"
-```
-- Run the script
-
-
-
From d982b4e8fb80dd46827aa18c6be17d6686ef61e5 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Tue, 5 May 2020 21:03:53 +0300
Subject: [PATCH 21/55] Update Readme.md
---
File Management/Readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/File Management/Readme.md b/File Management/Readme.md
index 9534d93c..673a947a 100644
--- a/File Management/Readme.md
+++ b/File Management/Readme.md
@@ -1,6 +1,6 @@
The scripts in this section allow better file management.
-
+
* Add thousands of documents to your SPO library
From eebbeca932216fa660ac8c06ec6bf47a25bb17bc Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Sun, 10 May 2020 21:04:34 +0300
Subject: [PATCH 22/55] Create README.md
---
Items Management/Attachments/README.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 Items Management/Attachments/README.md
diff --git a/Items Management/Attachments/README.md b/Items Management/Attachments/README.md
new file mode 100644
index 00000000..9c558e35
--- /dev/null
+++ b/Items Management/Attachments/README.md
@@ -0,0 +1 @@
+.
From 0f49aa77f17e6088d65a1f9d0b35327f36724033 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Tue, 12 May 2020 18:16:32 +0300
Subject: [PATCH 23/55] Update README.md
---
Items Management/README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/Items Management/README.md b/Items Management/README.md
index 9c558e35..d2f8a3c5 100644
--- a/Items Management/README.md
+++ b/Items Management/README.md
@@ -1 +1,2 @@
.
+
From b25560749ba6ca5df1ce780f345089f780049ce9 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Wed, 13 May 2020 18:27:50 +0300
Subject: [PATCH 24/55] Update description.md
---
.../Get large SharePoint Online lists/description.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lists and Libraries Management/Get large SharePoint Online lists/description.md b/Lists and Libraries Management/Get large SharePoint Online lists/description.md
index 7daff576..0b5afb99 100644
--- a/Lists and Libraries Management/Get large SharePoint Online lists/description.md
+++ b/Lists and Libraries Management/Get large SharePoint Online lists/description.md
@@ -14,7 +14,7 @@ In order to use the script, modify the following lines. DO NOT enter password in
-PowerShell
+```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"
@@ -28,7 +28,7 @@ $Url="https://etr56.sharepoint.com"
# where should the report be saved
$csvPath = "C:\Users\Public\largelists.csv"
$itemThreshold = 20000
-
+```
From 89ae1b1571101c939ea48dd9fa6af7afb1b0a9da Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Wed, 13 May 2020 18:27:57 +0300
Subject: [PATCH 25/55] Create README.md
---
.../README.md | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 Lists and Libraries Management/Get large SharePoint Online lists/README.md
diff --git a/Lists and Libraries Management/Get large SharePoint Online lists/README.md b/Lists and Libraries Management/Get large SharePoint Online lists/README.md
new file mode 100644
index 00000000..0b5afb99
--- /dev/null
+++ b/Lists and Libraries Management/Get large SharePoint Online lists/README.md
@@ -0,0 +1,37 @@
+The script loops through all site collections, all their subsites and finds lists with more than x items. You can define x.
+
+It generates a report to csv file.
+
+
+
+
+
+
+
+In order to use the script, modify the following lines. DO NOT enter password in the file:
+
+
+
+
+
+```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"
+
+# Insert the credentials and the name of the admin site
+$Username="ana@etr56.onmicrosoft.com"
+$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
+$Url="https://etr56.sharepoint.com"
+
+# reporting parameters
+ # where should the report be saved
+$csvPath = "C:\Users\Public\largelists.csv"
+$itemThreshold = 20000
+```
+
+
+
+Another variation of the script creates a nicer/shorter report. Check it out here:
+
+https://gallery.technet.microsoft.com/office/Get-large-SharePoint-f2634c12
From d707d7bba56fcca6bf2f4e4c3d6c9be93d4e8bc6 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Sat, 16 May 2020 13:12:54 +0300
Subject: [PATCH 26/55] Create README.md
---
Tenant Settings/README.md | 1 +
1 file changed, 1 insertion(+)
create mode 100644 Tenant Settings/README.md
diff --git a/Tenant Settings/README.md b/Tenant Settings/README.md
new file mode 100644
index 00000000..9c558e35
--- /dev/null
+++ b/Tenant Settings/README.md
@@ -0,0 +1 @@
+.
From 9f9358ae3d2cc6d40f0e9f635a638fd7ba0364d3 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Sun, 7 Jun 2020 20:39:55 +0300
Subject: [PATCH 27/55] Create README.md
---
.../README.md | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 Power Automate/Enable Microsoft Flow in all lists on SharePoint modern site/README.md
diff --git a/Power Automate/Enable Microsoft Flow in all lists on SharePoint modern site/README.md b/Power Automate/Enable Microsoft Flow in all lists on SharePoint modern site/README.md
new file mode 100644
index 00000000..7b991c5e
--- /dev/null
+++ b/Power Automate/Enable Microsoft Flow in all lists on SharePoint modern site/README.md
@@ -0,0 +1,33 @@
+Short Powershell script that enables flows for all lists and libraries in SharePoint Online modern site.
+
+It modifies DisableFlows property of a SharePoint Online site. The script is related to and more described in an article [Verifying and modifying Flows Policy in SharePoint Online site using Powershell](https://social.technet.microsoft.com/wiki/contents/articles/39331.sharepoint-online-verifying-and-modifying-flows-policy-in-site-using-powershell.aspx) on the TechNet Wiki.
+
+
+
+If the setting is set to disabled, the flows button will be missing on all lists and libraries in the site:
+
+
+
+
+## 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"
+$AdminUrl="https://TENANT-admin.sharepoint.com"
+$Url="https://TENANT.sharepoint.com"
+ ```
+ - Run the script
From 0dccdb49373f09ebb6a9c9987a8ea3ff85faa8fe Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Wed, 17 Jun 2020 20:07:14 +0300
Subject: [PATCH 28/55] Create README.md
---
.../README.md | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
create mode 100644 Lists and Libraries Management/Change search setting for all lists in a site/README.md
diff --git a/Lists and Libraries Management/Change search setting for all lists in a site/README.md b/Lists and Libraries Management/Change search setting for all lists in a site/README.md
new file mode 100644
index 00000000..6e35fd74
--- /dev/null
+++ b/Lists and Libraries Management/Change search setting for all lists in a site/README.md
@@ -0,0 +1,29 @@
+A short Powershell script to allow or disallow crawling on a SharePoint Online list. Depending on this settings the list items will either appear or not in the search results.
+
+
+
+It corresponds to the Search setting available under **List**>**List Settings**>**Advanced in the User Interface**:
+
+
+
+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:
+
+```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"
+
+# Insert the credentials and the name of the site
+$Username="trial@trialtrial123.onmicrosoft.com"
+$AdminPassword="Pass"
+$Url="https://trialtrial123.sharepoint.com/sites/teamsitewithlists"
+$NoCrawl=$true
+ ```
+
+The results:
+
+
+
+Please share your thoughts in the Issues section!
From 0c38dc5457035256d76d25f2b6e62efbe91019af Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Thu, 18 Jun 2020 00:33:59 +0300
Subject: [PATCH 29/55] Create README.md
---
.../Allow list to be deleted/README.md | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 Lists and Libraries Management/Allow list to be deleted/README.md
diff --git a/Lists and Libraries Management/Allow list to be deleted/README.md b/Lists and Libraries Management/Allow list to be deleted/README.md
new file mode 100644
index 00000000..4fef4bf6
--- /dev/null
+++ b/Lists and Libraries Management/Allow list to be deleted/README.md
@@ -0,0 +1,34 @@
+My advice is don't. That flag is there for a reason and make sure you know what you are doing and are aware of the consequences before you use this script.
+
+
+
+The script allows a SharePoint Online list or library to be deleted. If under list settings a button "Delete this list" or "Delete this document library" is missing, it should return.
+
+Please beware that the button is missing for a reason. Do not execute the script if you do not want the list to be deleted.
+
+The script does not delete the list itself.
+
+
+
+How to use the script?
+
+1. Download and open the file.
+
+2. Enter the connection data to your tenant and the paths to appropriate 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\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"
+
+# Insert the credentials and the name of the admin site
+$Username="ana@etr56.onmicrosoft.com"
+$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
+$Url="https://etr56.sharepoint.com/sites/testflow"
+$ListTitle="Customers"
+
+3. Define whether you want to allow the list to be deleted ($true):
+
+PowerShell
+$lista.AllowDeletion = $false
+
From 4909c0a5a5b6394beb3219cfe0e59ac31c583515 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Wed, 24 Jun 2020 18:52:30 +0300
Subject: [PATCH 30/55] Create README.md
---
.../README.md | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 Licensing/Get user licenses and services provisioning statuses/README.md
diff --git a/Licensing/Get user licenses and services provisioning statuses/README.md b/Licensing/Get user licenses and services provisioning statuses/README.md
new file mode 100644
index 00000000..c27e86e1
--- /dev/null
+++ b/Licensing/Get user licenses and services provisioning statuses/README.md
@@ -0,0 +1,24 @@
+Short Powershell script to export user licenses and services' provisioning status.
+
+## How to use?
+
+1. Download and run the script.
+
+2. During execution it will ask you for Office 365 Admin credentials
+
+3. If you want to create a report on the users (apart from seeing the info on the screen also export data to a csv), there is a built-in function in the script, and you just need to update the following line:
+
+
+
+```PowerShell
+$CSVPath="C:\Users\Arletka\Documents\usss34.csv"
+```
+## Expected results
+
+During script execution:
+
+
+
+In a csv file:
+
+
From f11911b8841385109cade3d4f004d58279e94b1f Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Wed, 24 Jun 2020 18:52:56 +0300
Subject: [PATCH 31/55] Delete description.md
---
.../description.md | 24 -------------------
1 file changed, 24 deletions(-)
delete mode 100644 Licensing/Get user licenses and services provisioning statuses/description.md
diff --git a/Licensing/Get user licenses and services provisioning statuses/description.md b/Licensing/Get user licenses and services provisioning statuses/description.md
deleted file mode 100644
index c27e86e1..00000000
--- a/Licensing/Get user licenses and services provisioning statuses/description.md
+++ /dev/null
@@ -1,24 +0,0 @@
-Short Powershell script to export user licenses and services' provisioning status.
-
-## How to use?
-
-1. Download and run the script.
-
-2. During execution it will ask you for Office 365 Admin credentials
-
-3. If you want to create a report on the users (apart from seeing the info on the screen also export data to a csv), there is a built-in function in the script, and you just need to update the following line:
-
-
-
-```PowerShell
-$CSVPath="C:\Users\Arletka\Documents\usss34.csv"
-```
-## Expected results
-
-During script execution:
-
-
-
-In a csv file:
-
-
From 371a23a45767c56269e51f8d3d0f0ad9584b546c Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Fri, 26 Jun 2020 09:52:24 +0300
Subject: [PATCH 32/55] Create README.md
---
.../README.md | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 Items Management/Attachments/Add size of SharePoint item attachments to list view/README.md
diff --git a/Items Management/Attachments/Add size of SharePoint item attachments to list view/README.md b/Items Management/Attachments/Add size of SharePoint item attachments to list view/README.md
new file mode 100644
index 00000000..677f8286
--- /dev/null
+++ b/Items Management/Attachments/Add size of SharePoint item attachments to list view/README.md
@@ -0,0 +1,40 @@
+Powershell script that adds size of all item attachments to a list view.
+
+First the script finds all items with attachments. Then it adds the size of all attachments in a given item. At the end it enters the value in a column. The column needs to exist beforehand.
+
+
+
+You can adjust the script and display the size in MB or KB.
+
+
+
+Sample results:
+
+
+
+
+
+In order to use the script you need to enter your data:
+
+```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"
+
+
+#Enter the data
+$username = "ana@etr56.onmicrosoft.com"
+$Url = "https://etr56.sharepoint.com"
+$ListTitle = "attatest"
+$ColumnName = "Size In KB" #name of the column where you want to display size.
+
+```
+
+
+
+
+
+
+
+
+
From 62c97272835a8799dd3275aceefc98f35e7f8f6b Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Fri, 26 Jun 2020 09:52:50 +0300
Subject: [PATCH 33/55] Update description.md
---
.../description.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Items Management/Attachments/Add size of SharePoint item attachments to list view/description.md b/Items Management/Attachments/Add size of SharePoint item attachments to list view/description.md
index 60b4db05..3e7cd3a7 100644
--- a/Items Management/Attachments/Add size of SharePoint item attachments to list view/description.md
+++ b/Items Management/Attachments/Add size of SharePoint item attachments to list view/description.md
@@ -16,7 +16,7 @@ Sample results:
In order to use the script you need to enter your data:
-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\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
@@ -27,7 +27,7 @@ $username = "ana@etr56.onmicrosoft.com"
$Url = "https://etr56.sharepoint.com"
$ListTitle = "attatest"
$ColumnName = "Size In KB" #name of the column where you want to display size.
-
+```
From a1565f5aa5753111eaeb69bfba20f2cb4ceceac8 Mon Sep 17 00:00:00 2001
From: WhoeverAmI <67475706+WhoeverAmI@users.noreply.github.com>
Date: Fri, 26 Jun 2020 17:53:54 +0200
Subject: [PATCH 34/55] formatted
---
.../ContentTypeManagement.ps1 | 74 +++++++++----------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/Content Types/Content Types Management Setting/Allow content type management for all lists in a site/ContentTypeManagement.ps1 b/Content Types/Content Types Management Setting/Allow content type management for all lists in a site/ContentTypeManagement.ps1
index 00cec4ef..1d3c4d46 100644
--- a/Content Types/Content Types Management Setting/Allow content type management for all lists in a site/ContentTypeManagement.ps1
+++ b/Content Types/Content Types Management Setting/Allow content type management for all lists in a site/ContentTypeManagement.ps1
@@ -2,42 +2,42 @@
# Created by Arleta Wanat, 2015
#
-function Set-SPOListsContentTypesEnabled{
- param (
- [Parameter(Mandatory=$true,Position=1)]
- [string]$Username,
- [Parameter(Mandatory=$true,Position=2)]
- [string]$AdminPassword,
- [Parameter(Mandatory=$true,Position=3)]
- [string]$Url,
- [Parameter(Mandatory=$true,Position=4)]
- [bool]$ContentTypesEnabled
- )
-
- $password = ConvertTo-SecureString -string $AdminPassword -AsPlainText -Force
+function Set-SPOListsContentTypesEnabled {
+ param (
+ [Parameter(Mandatory = $true, Position = 1)]
+ [string]$Username,
+ [Parameter(Mandatory = $true, Position = 2)]
+ [string]$AdminPassword,
+ [Parameter(Mandatory = $true, Position = 3)]
+ [string]$Url,
+ [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()
+ $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
+ $ctx.ExecuteQuery()
- $Lists=$ctx.Web.Lists
+ $Lists = $ctx.Web.Lists
- $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
- }
-
- }
+ $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
+ }
+
+ }
}
@@ -47,10 +47,10 @@ 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"
# Insert the credentials and the name of the site and the desired setting: $true or $false
-$Username="trial@trialtrial123.onmicrosoft.com"
-$AdminPassword="Pass"
-$Url="https://trialtrial123.sharepoint.com/sites/teamsitewithlists"
-$ContentTypesEnabled=$true
+$Username = "trial@trialtrial123.onmicrosoft.com"
+$AdminPassword = "Pass"
+$Url = "https://trialtrial123.sharepoint.com/sites/teamsitewithlists"
+$ContentTypesEnabled = $true
From f344983f4318247f603d51e4ccdc63ef70874073 Mon Sep 17 00:00:00 2001
From: WhoeverAmI <67475706+WhoeverAmI@users.noreply.github.com>
Date: Fri, 26 Jun 2020 17:54:58 +0200
Subject: [PATCH 35/55] formatted
---
.../AddContentTypetoListsWithWorkflows.ps1 | 100 +++++++++---------
1 file changed, 50 insertions(+), 50 deletions(-)
diff --git a/Content Types/Create/Add Content Type to Lists with Workflows/AddContentTypetoListsWithWorkflows.ps1 b/Content Types/Create/Add Content Type to Lists with Workflows/AddContentTypetoListsWithWorkflows.ps1
index c3693164..06353531 100644
--- a/Content Types/Create/Add Content Type to Lists with Workflows/AddContentTypetoListsWithWorkflows.ps1
+++ b/Content Types/Create/Add Content Type to Lists with Workflows/AddContentTypetoListsWithWorkflows.ps1
@@ -1,67 +1,67 @@
-function New-SPOContentType{
- 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]$Description,
- [Parameter(Mandatory=$true,Position=5)]
- [string]$Name,
- [Parameter(Mandatory=$true,Position=6)]
- [string]$Group,
- [Parameter(Mandatory=$true,Position=7)]
- [string]$ParentContentTypeID
- )
+function New-SPOContentType {
+ 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]$Description,
+ [Parameter(Mandatory = $true, Position = 5)]
+ [string]$Name,
+ [Parameter(Mandatory = $true, Position = 6)]
+ [string]$Group,
+ [Parameter(Mandatory = $true, Position = 7)]
+ [string]$ParentContentTypeID
+ )
- $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()
+ $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()
- $lci =New-Object Microsoft.SharePoint.Client.ContentTypeCreationInformation
- $lci.Description=$Description
- $lci.Name=$Name
- #$lci.ID="0x0100aa862727aed04408b2599b25356e7000"
- $lci.ParentContentType=$ctx.Web.ContentTypes.GetById($ParentContentTypeID)
- $lci.Group=$Group
+ $lci = New-Object Microsoft.SharePoint.Client.ContentTypeCreationInformation
+ $lci.Description = $Description
+ $lci.Name = $Name
+ #$lci.ID="0x0100aa862727aed04408b2599b25356e7000"
+ $lci.ParentContentType = $ctx.Web.ContentTypes.GetById($ParentContentTypeID)
+ $lci.Group = $Group
- foreach($ll in $ctx.Web.Lists){
- $ctx.Load($ll.WorkflowAssociations)
- $ctx.ExecuteQuery()
+ foreach ($ll in $ctx.Web.Lists) {
+ $ctx.Load($ll.WorkflowAssociations)
+ $ctx.ExecuteQuery()
- if($ll.WorkflowAssociations.Count -gt 0){
- $ContentType = $ll.ContentTypes.Add($lci)
- $ctx.Load($contentType)
- try{
- $ctx.ExecuteQuery()
- Write-Host "Adding content type " $Name " to " $ll.Title
- }
- catch [Net.WebException]{
- Write-Host $_.Exception.ToString()
- }
- }
- }
+ if ($ll.WorkflowAssociations.Count -gt 0) {
+ $ContentType = $ll.ContentTypes.Add($lci)
+ $ctx.Load($contentType)
+ try {
+ $ctx.ExecuteQuery()
+ Write-Host "Adding content type " $Name " to " $ll.Title
+ }
+ catch [Net.WebException] {
+ Write-Host $_.Exception.ToString()
+ }
+ }
+ }
}
- # Paths to SDK. Please verify location on your computer.
+# 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"
# Insert the credentials and the name of the admin site
-$Username="admin@tenant.onmicrosoft.com"
-$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
-$AdminUrl="https://tenant.sharepoint.com/sites/teamsitewithlists"
-$Description="desc"
-$Name="From PS to Tasks234"
-$ParentContentTypeID="0x0107"
-$Group="List Content Types"
+$Username = "admin@tenant.onmicrosoft.com"
+$AdminPassword = Read-Host -Prompt "Password" -AsSecureString
+$AdminUrl = "https://tenant.sharepoint.com/sites/teamsitewithlists"
+$Description = "desc"
+$Name = "From PS to Tasks234"
+$ParentContentTypeID = "0x0107"
+$Group = "List Content Types"
From 6803ef8b212ae63d803e78400b6a3a74d4d4d965 Mon Sep 17 00:00:00 2001
From: PowershellScripts <42035526+PowershellScripts@users.noreply.github.com>
Date: Tue, 30 Jun 2020 09:49:33 +0300
Subject: [PATCH 36/55] Create README.md
---
.../README.md | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 Items Management/Attachments/Copy all SharePoint Online list item attachments/README.md
diff --git a/Items Management/Attachments/Copy all SharePoint Online list item attachments/README.md b/Items Management/Attachments/Copy all SharePoint Online list item attachments/README.md
new file mode 100644
index 00000000..5fffbeac
--- /dev/null
+++ b/Items Management/Attachments/Copy all SharePoint Online list item attachments/README.md
@@ -0,0 +1,33 @@
+Powershell script retrieves all the item attachments from a SharePoint list and copies them to a separate library or a folder within a library.
+
+
+
+In order to use the script, you need to enter your data in the downloaded file:
+
+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"
+
+#Please enter your data
+$Username = "ana@etr56.onmicrosoft.com"
+$Url = "https://etr56.sharepoint.com"
+$ListTitle = "attatest"
+$CSVPath = "C:\Users\Public\attachmentsreport.csv"
+$DestinationLibraryFullPath = "/test/AttachmentsFromAtta"
+
+Examples of $DestinationLibraryFullPath:
+
+e.g. "/sites/powie4/Destiny2/" where powie4 is the name of the site collection and Destiny2 is the name of the library
+
+e.g. "/test/AttachmentsFromAtta" where test is the name of a library in root site collection and AttachmentsFromAtta is the name of a folder
+
+
+
+
+
+
+
+#Disclaimer#
+
+Never trust a script from internet. Test it before using in prod. My script may be perfect, but I we may have different things in mind and we may understand the description differently. Post a question if unsure.
From d61b4565e7d6647d4247f4fde73087ab9f731160 Mon Sep 17 00:00:00 2001
From: WhoeverAmI <67475706+WhoeverAmI@users.noreply.github.com>
Date: Tue, 30 Jun 2020 08:55:22 +0200
Subject: [PATCH 37/55] Update and rename workflows in one site coll.ps1 to
Report workflows in one site collection.ps1
---
...eport workflows in one site collection.ps1 | 64 +++++++++++++++++++
.../workflows in one site coll.ps1 | 64 -------------------
2 files changed, 64 insertions(+), 64 deletions(-)
create mode 100644 Workflows/Get workflow report for a site collection/Report workflows in one site collection.ps1
delete mode 100644 Workflows/Get workflow report for a site collection/workflows in one site coll.ps1
diff --git a/Workflows/Get workflow report for a site collection/Report workflows in one site collection.ps1 b/Workflows/Get workflow report for a site collection/Report workflows in one site collection.ps1
new file mode 100644
index 00000000..4b994776
--- /dev/null
+++ b/Workflows/Get workflow report for a site collection/Report workflows in one site collection.ps1
@@ -0,0 +1,64 @@
+function Get-Workflows {
+ 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]$CSVPath
+ )
+
+ $ctx = New-Object Microsoft.SharePoint.Client.ClientContext($Url)
+ $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
+ $ctx.ExecuteQuery()
+
+ $Lists = $ctx.Web.Lists
+ $ctx.Load($ctx.Web)
+ $ctx.Load($ctx.Web.Webs)
+ $ctx.Load($Lists)
+ $ctx.ExecuteQuery()
+
+ foreach ( $ll in $Lists) {
+ $WorkflowCollection = $ll.WorkflowAssociations;
+ $ctx.Load($WorkflowCollection);
+
+ try {
+ $ctx.ExecuteQuery();
+ Write-host $ll.Title $WorkflowCollection.Count -ForegroundColor Green
+ }
+ catch [Net.WebException] {
+ Write-Host "Failed for " $ll.Title -ForegroundColor Red
+ }
+
+ foreach ($SingleWorkflow in $WorkflowCollection) {
+ $SingleWorkflow | Add-Member NoteProperty "SiteUrl"($ctx.Web.Url)
+ $SingleWorkflow | Add-Member NoteProperty "ListTitle"($ll.Title)
+ Write-Output $SingleWorkflow
+
+ $SingleWorkflow | export-csv -Path $CSVPath -Append
+ }
+ }
+
+ if ($ctx.Web.Webs.Count -gt 0) {
+ Write-Host "--"-ForegroundColor DarkGreen
+
+ for ($i = 0; $i -lt $ctx.Web.Webs.Count ; $i++) {
+ Get-Workflows -Username $Username -AdminPassword $AdminPassword -Url $ctx.Web.Webs[$i].Url -CSVPath $CSVpath
+ }
+ }
+}
+
+# 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"
+
+# Insert the credentials and the name of the site collection and the path where the report should be saved.
+$Username = "2190@tenant.onmicrosoft.com"
+$AdminPassword = Read-Host -Prompt "Password" -AsSecureString
+$Url = "https://tenant.sharepoint.com"
+$CSVpath = "C:\testpath.csv"
+
+Get-Workflows -Username $Username -AdminPassword $AdminPassword -Url $Url -CSVPath $CSVpath
+
diff --git a/Workflows/Get workflow report for a site collection/workflows in one site coll.ps1 b/Workflows/Get workflow report for a site collection/workflows in one site coll.ps1
deleted file mode 100644
index 5dfb1288..00000000
--- a/Workflows/Get workflow report for a site collection/workflows in one site coll.ps1
+++ /dev/null
@@ -1,64 +0,0 @@
-function Get-Workflows{
- 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]$CSVPath
- )
-
- $ctx=New-Object Microsoft.SharePoint.Client.ClientContext($Url)
- $ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
- $ctx.ExecuteQuery()
-
- $Lists=$ctx.Web.Lists
- $ctx.Load($ctx.Web)
- $ctx.Load($ctx.Web.Webs)
- $ctx.Load($Lists)
- $ctx.ExecuteQuery()
-
- foreach ( $ll in $Lists){
- $WorkflowCollection = $ll.WorkflowAssociations;
- $ctx.Load($WorkflowCollection);
-
- try{
- $ctx.ExecuteQuery();
- Write-host $ll.Title $WorkflowCollection.Count -ForegroundColor Green
- }
- catch [Net.WebException] {
- Write-Host "Failed for " $ll.Title -ForegroundColor Red
- }
-
- foreach ($SingleWorkflow in $WorkflowCollection){
- $SingleWorkflow | Add-Member NoteProperty "SiteUrl"($ctx.Web.Url)
- $SingleWorkflow | Add-Member NoteProperty "ListTitle"($ll.Title)
- Write-Output $SingleWorkflow
-
- $SingleWorkflow | export-csv -Path $CSVPath -Append
- }
- }
-
- if($ctx.Web.Webs.Count -gt 0){
- Write-Host "--"-ForegroundColor DarkGreen
-
- for($i=0;$i -lt $ctx.Web.Webs.Count ;$i++){
- Get-Workflows -Username $Username -AdminPassword $AdminPassword -Url $ctx.Web.Webs[$i].Url -CSVPath $CSVpath
- }
- }
-}
-
-# 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"
-
-# Insert the credentials and the name of the site collection and the path where the report should be saved.
-$Username="2190@tenant.onmicrosoft.com"
-$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
-$Url="https://tenant.sharepoint.com"
-$CSVpath="C:\testpath.csv"
-
-Get-Workflows -Username $Username -AdminPassword $AdminPassword -Url $Url -CSVPath $CSVpath
-
From 2d60fd422200e23387005e756088a167a0bebe66 Mon Sep 17 00:00:00 2001
From: WhoeverAmI <67475706+WhoeverAmI@users.noreply.github.com>
Date: Tue, 30 Jun 2020 08:56:37 +0200
Subject: [PATCH 38/55] Create README.md
---
.../README.md | 206 ++++++++++++++++++
1 file changed, 206 insertions(+)
create mode 100644 Workflows/Get workflow report for all site collections/README.md
diff --git a/Workflows/Get workflow report for all site collections/README.md b/Workflows/Get workflow report for all site collections/README.md
new file mode 100644
index 00000000..b9dda8a0
--- /dev/null
+++ b/Workflows/Get workflow report for all site collections/README.md
@@ -0,0 +1,206 @@
+Powershell script. Creates a .csv file with a report on all workflows in all site collections, their sites and subsites.
+
+Before you run the script, open ```.ps1``` file and edit all necessary information:
+
+```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"
+
+# Insert the credentials and the name of the admin site
+$Username="user@tenant.onmicrosoft.com"
+$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
+$AdminUrl="https://tenant-admin.sharepoint.com"
+$CSVPath="C:\Users\ivo\Desktop\SomePath.csv"
+```
+
+It requires installed [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038)
+
+As the script runs you will see how many workflows each list has:
+
+
+
+### Sample report
+
+
| #TYPE Microsoft.SharePoint.Client.Workflow.WorkflowAssociation | ++ | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | ||
| Site Url | +List Title | +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://tenant.sharepoint.com | +Documents | +True | +<dfs:myFields xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types" xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields" + xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields" xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes" xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dfs:queryFields></dfs:queryFields><dfs:dataFields><d:SharePointListItem_RW><d:Approvers><d:Assignment><d:Assignee><pc:Person><pc:DisplayName>Arleta + Wanat</pc:DisplayName><pc:AccountId>i:0#.f|membership|2190@tenant.onmicrosoft.com</pc:AccountId><pc:AccountType>User</pc:AccountType></pc:Person></d:Assignee><d:Stage xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /><d:AssignmentType>Serial</d:AssignmentType></d:Assignment><d:Assignment><d:Assignee><pc:Person><pc:DisplayName>Arleta Wanat</pc:DisplayName><pc:AccountId>i:0#.f|membership|2190@tenant.onmicrosoft.com</pc:AccountId><pc:AccountType>User</pc:AccountType></pc:Person></d:Assignee><d:Stage + xsi:nil="true" /><d:AssignmentType>Serial</d:AssignmentType></d:Assignment></d:Approvers><d:ExpandGroups>true</d:ExpandGroups><d:NotificationMessage>hf</d:NotificationMessage><d:DueDateforAllTasks xsi:nil="true" + /><d:DurationforSerialTasks xsi:nil="true" /><d:DurationUnits>Day</d:DurationUnits><d:CC /><d:CancelonRejection>false</d:CancelonRejection><d:CancelonChange>false</d:CancelonChange><d:EnableContentApproval>false</d:EnableContentApproval></d:SharePointListItem_RW></dfs:dataFields></dfs:myFields> | +False | +False | +8ad4d8f0-93a7-4941-9657-cf3706f00409 | +######## | +Routes a document for approval. Approvers can approve or reject the document, reassign the approval task, or request changes to the document. | +True | +Workflow History | +e76e75fe-1622-4c26-a5fa-7e6178c61ae9 | +_layouts/15/IniWrkflIP.aspx | +oo + +<Cfg.d3a8e0e9_03da_4f32_99c9_f778c1d5d560.4.512.> |
+True | +19e3d565-15c5-4a89-b95a-626b48ff0bcc | +######## | +oo | +Task List with 14 elements | +b05b85f0-c7fe-4646-ac41-4fde2db44f3b | +Microsoft.SharePoint.Client.ClientContext | +Microsoft.SharePoint.Client.ObjectPathIdentity | +False | +Microsoft.SharePoint.Client.Workflow.WorkflowAssociation | +||
| https://tenant.sharepoint.com/nowanowa | +Site Pages | +True | ++ | True | +True | +dd19a800-37c1-43c0-816d-f8eb5f4a4145 | +######## | +Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents. | +True | +Workflow History | +139a534e-abe6-4862-b19e-895eac1e0cbc | +mjyf | +False | +c6e865a5-b992-4a51-ba25-9ecd76ba336f | +######## | +mjyf | +Tasks | +0a2bec62-9fd7-44a4-b1bb-eacc553b3cd2 | +Microsoft.SharePoint.Client.ClientContext | +Microsoft.SharePoint.Client.ObjectPathIdentity | +False | +Microsoft.SharePoint.Client.Workflow.WorkflowAssociation | +|||
| https://tenant.sharepoint.com/newSiteCollection | +Documents | +True | ++ | True | +True | +dd19a800-37c1-43c0-816d-f8eb5f4a4145 | +######## | +Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents. | +True | +Workflow History | +e9dd54d1-27db-4ca9-8a84-6266ab3e824f | +app2 | +False | +62a23f97-fe21-4142-b485-9805474162b1 | +######## | +app2 | +Tasks | +051be499-7633-4837-a3d6-68fc68ca0bcb | +Microsoft.SharePoint.Client.ClientContext | +Microsoft.SharePoint.Client.ObjectPathIdentity | +False | +Microsoft.SharePoint.Client.Workflow.WorkflowAssociation | +|||
| https://tenant.sharepoint.com/vs20072153 | +Site Pages | +True | ++ | True | +True | +dd19a800-37c1-43c0-816d-f8eb5f4a4145 | +######## | +Manages document expiration and retention by allowing participants to decide whether to retain or delete expired documents. | +True | +Workflow History | +c7cd1221-4dd7-4e0c-953b-aee71519116b | +uoiio | +False | +545e45b7-6c2d-4378-9d23-cd08acf7ce19 | +######## | +uoiio | +Tasks | +d7275f5e-6ec5-4f67-a817-dc3d694027ed | +Microsoft.SharePoint.Client.ClientContext | +Microsoft.SharePoint.Client.ObjectPathIdentity | +False | +Microsoft.SharePoint.Client.Workflow.WorkflowAssociation | +|||
| https://tenant.sharepoint.com/TeamsitewithLists | +Generic List With GeolocationColumn | +False | ++ | ||||||||||||||||||||||