Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
9c9fe89
Merge pull request #57 from PowershellScripts/structure-fixes
PowershellScripts Jan 29, 2020
248d43e
Update description.md
JakubPiegza Jan 30, 2020
3769f19
Update description.md
JakubPiegza Jan 30, 2020
be7aca8
Update description.md
JakubPiegza Jan 30, 2020
22f5ca0
Update description.md
JakubPiegza Jan 30, 2020
083a886
Update description.md
JakubPiegza Jan 30, 2020
ebdf423
Update description.md
JakubPiegza Jan 30, 2020
0db1a7c
Update description.md
JakubPiegza Jan 30, 2020
3b9393d
Update description.md
JakubPiegza Jan 30, 2020
4549f37
Update description.md
JakubPiegza Jan 30, 2020
6bad778
Update description.md
JakubPiegza Jan 30, 2020
834ade4
Update description.md
JakubPiegza Jan 30, 2020
c026f93
Update description.md
JakubPiegza Jan 30, 2020
fc13649
Update description.md
JakubPiegza Jan 30, 2020
b27c161
Update GetSingleContentTypeLoopParentName.ps1
JakubPiegza Jan 30, 2020
c06d4eb
Update description.md
JakubPiegza Jan 30, 2020
d0826bd
Update description.md
JakubPiegza Jan 30, 2020
9d92dd5
Update GetAllContentTypes.ps1
JakubPiegza Jan 30, 2020
d4c13bc
Update description.md
JakubPiegza Jan 30, 2020
35095c0
Update description.md
JakubPiegza Jan 30, 2020
95af43d
Update description.md
JakubPiegza Jan 31, 2020
b5abc6c
Update GetSingleContentType.ps1
JakubPiegza Jan 31, 2020
f42e7c5
Update description.md
JakubPiegza Jan 31, 2020
5a2e32e
Update ContentTypesWithoutPSObjectWithoutEXtraProperties.ps1
JakubPiegza Jan 31, 2020
042243c
Update description.md
JakubPiegza Jan 31, 2020
7879b21
Update GetSingleContentTypeLoopGroup.ps1
JakubPiegza Jan 31, 2020
18bef13
Update description.md
JakubPiegza Jan 31, 2020
d9ebb27
Update GetSingleContentTypeLoopSealed.ps1
JakubPiegza Jan 31, 2020
d1654b6
Update description.md
JakubPiegza Jan 31, 2020
2160ee1
Update GetContentTypePropertiesByID.ps1
JakubPiegza Jan 31, 2020
b2bab7d
Update description.md
JakubPiegza Jan 31, 2020
a3f6e40
Update RecursiveContentTypesName.ps1
JakubPiegza Jan 31, 2020
9e09e5a
Update description.md
JakubPiegza Jan 31, 2020
4a07f40
Update ModifyDisplayFormTemplateName-ReturnToAllDefault-Verify.ps1
JakubPiegza Jan 31, 2020
65234ca
Create Readme.md
PowershellScripts Jan 31, 2020
d947fa1
Merge pull request #113 from JakubPiegza/patch-60
PowershellScripts Jan 31, 2020
3e65634
Merge pull request #114 from JakubPiegza/patch-61
PowershellScripts Jan 31, 2020
68d1e53
Merge pull request #109 from JakubPiegza/patch-56
PowershellScripts Jan 31, 2020
14111e0
Merge pull request #95 from JakubPiegza/patch-42
PowershellScripts Feb 1, 2020
1395b4d
Merge pull request #101 from JakubPiegza/patch-48
PowershellScripts Feb 1, 2020
9ad37bb
Merge pull request #99 from JakubPiegza/patch-46
PowershellScripts Feb 1, 2020
b112bb6
Merge pull request #93 from JakubPiegza/patch-40
PowershellScripts Feb 1, 2020
b4d9d73
Merge pull request #110 from JakubPiegza/patch-57
PowershellScripts Feb 1, 2020
bee47d1
Merge pull request #98 from JakubPiegza/patch-45
PowershellScripts Feb 1, 2020
eccd841
Merge pull request #119 from JakubPiegza/patch-66
PowershellScripts Feb 1, 2020
160768c
Merge pull request #115 from JakubPiegza/patch-62
PowershellScripts Feb 1, 2020
b2423c2
Merge pull request #117 from JakubPiegza/patch-64
PowershellScripts Feb 2, 2020
cfbc7a4
Merge pull request #111 from JakubPiegza/patch-58
PowershellScripts Feb 2, 2020
96617eb
Update description.md
PowershellScripts Feb 2, 2020
21108c6
Merge pull request #107 from JakubPiegza/patch-54
PowershellScripts Feb 2, 2020
b35f81e
Merge pull request #105 from JakubPiegza/patch-52
PowershellScripts Feb 2, 2020
77ab4bc
Merge pull request #103 from JakubPiegza/patch-50
PowershellScripts Feb 2, 2020
fdbf463
Merge pull request #97 from JakubPiegza/patch-44
PowershellScripts Feb 2, 2020
812d10f
Merge pull request #91 from JakubPiegza/patch-38
PowershellScripts Feb 2, 2020
afcb39e
Create description.md
PowershellScripts Feb 2, 2020
1fb997c
Create test.txt
PowershellScripts Feb 2, 2020
18536c2
Add files via upload
PowershellScripts Feb 2, 2020
86bbc64
Add files via upload
PowershellScripts Feb 2, 2020
8dc7e02
Create description.md
PowershellScripts Feb 2, 2020
4e3bb96
Add files via upload
PowershellScripts Feb 2, 2020
6b7bb07
Add files via upload
PowershellScripts Feb 2, 2020
87fd16b
Create description.md
PowershellScripts Feb 2, 2020
0a1af8d
Create test.txt
PowershellScripts Feb 2, 2020
abeadc4
Add files via upload
PowershellScripts Feb 2, 2020
2b4ac58
Add files via upload
PowershellScripts Feb 2, 2020
692d216
Merge pull request #89 from JakubPiegza/patch-36
PowershellScripts Feb 2, 2020
16e6ab2
Merge pull request #87 from JakubPiegza/patch-34
PowershellScripts Feb 3, 2020
2c7107c
Merge pull request #79 from JakubPiegza/patch-26
PowershellScripts Feb 3, 2020
7102c05
Update ModifyDisplayFormTemplateName-ReturnToAllDefault-Verify.ps1
PowershellScripts Feb 3, 2020
f80de9e
Merge pull request #120 from JakubPiegza/patch-67
PowershellScripts Feb 3, 2020
f1f2c11
Merge pull request #83 from JakubPiegza/patch-30
PowershellScripts Feb 3, 2020
00c88fb
Merge pull request #85 from JakubPiegza/patch-32
PowershellScripts Feb 3, 2020
c84c113
Merge pull request #81 from JakubPiegza/patch-28
PowershellScripts Feb 3, 2020
7113189
Merge pull request #73 from JakubPiegza/patch-20
PowershellScripts Feb 3, 2020
d44b82d
Merge pull request #75 from JakubPiegza/patch-22
PowershellScripts Feb 4, 2020
c79a1d8
Merge pull request #118 from JakubPiegza/patch-65
PowershellScripts Feb 4, 2020
b415014
Update GetSingleContentType.ps1
PowershellScripts Feb 5, 2020
43e49f2
Merge pull request #108 from JakubPiegza/patch-55
PowershellScripts Feb 5, 2020
11a5345
Merge pull request #116 from JakubPiegza/patch-63
PowershellScripts Feb 5, 2020
7781d01
Merge pull request #112 from JakubPiegza/patch-59
PowershellScripts Feb 5, 2020
1a9bef8
Merge pull request #102 from JakubPiegza/patch-49
PowershellScripts Feb 5, 2020
c25fb54
Merge pull request #77 from JakubPiegza/patch-24
PowershellScripts Feb 7, 2020
c25770a
Create description.md
PowershellScripts Feb 8, 2020
8c688a5
Update description.md
PowershellScripts Feb 8, 2020
f1dcd8a
Add files via upload
PowershellScripts Feb 8, 2020
4416eb5
closes #17
PowershellScripts Feb 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ A short script to create a content type, and add it directly to a SharePoint Onl



The script is fully described in an article here:

http://social.technet.microsoft.com/wiki/contents/articles/31051.sharepoint-online-content-types-in-powershell.aspx



The script is fully described in an article [here](http://social.technet.microsoft.com/wiki/contents/articles/31051.sharepoint-online-content-types-in-powershell.aspx).

### How to use?

1. Download and install [SharePoint Online SDK](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)

Expand All @@ -36,17 +30,15 @@ $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 </br>
b) Instead of "admin@tenant.onmicrosoft.com" enter you username </br>
c) Instead of "https://tenant.sharepoint.com/sites/teamsitewithlibraries" enter the name of the site collection where you want to find the content types </br>
d) Fill in the properties of the content type. </br>


5. Run the script in Powershell (any module).

6. When the script has executed, Powershell will show a message Content Type Name of the Content Type2 has been added to Url of the Site.
6. When the script has executed, Powershell will show a message *Content Type Name of the Content Type2 has been added to Url of the Site*.



<br/><br/>
<b>Enjoy and please share feedback!</b>
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ A short script to create a content type, and add it directly to all SharePoint O



The script is fully described in an article here:

http://social.technet.microsoft.com/wiki/contents/articles/31051.sharepoint-online-content-types-in-powershell.aspx


The script is fully described in an article [here](http://social.technet.microsoft.com/wiki/contents/articles/31051.sharepoint-online-content-types-in-powershell.aspx).

### How to use?

1. Download and install [SharePoint Online SDK](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)

Expand All @@ -36,16 +30,14 @@ $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 </br>
b) Instead of "admin@tenant.onmicrosoft.com" enter you username </br>
c) Instead of "https://tenant.sharepoint.com/sites/teamsitewithlibraries" enter the name of the site collection where you want to find the content types </br>
d) Fill in the properties of the content type. </br>

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*.

<br/><br/>
<b>Enjoy and please share feedback!</b>
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
The script is part of the explanation on editing the content types available in the article here:

SharePoint Online content types in Powershell: Edit.
[SharePoint Online content types in Powershell: Edit.](https://social.technet.microsoft.com/wiki/contents/articles/31444.sharepoint-online-content-types-in-powershell-edit.aspx)

This example gets the list of all content types in all lists from a single site, which have custom display forms deployed.



The ~list/Item/displayifs.aspx is the url of the custom form that the list is using for adding new items:





The *~list/Item/displayifs.aspx* is the url of the custom form that the list is using for adding new items. (**[screenshot](https://github.com/PowershellScripts/AllGalleryScriptsSamples/blob/develop/Content%20Types/Display%20Forms/Find%20Custom%20Display%20Forms%20Deployed/DisplayFormUrl3.png)**)


In order to use the script you need SharePoint Online SDK installed. Before running the script modify the following lines to refer to the SDK libraries installed on your computer and the content type data:
In order to use the script you need [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038) installed. Before running the script modify the following lines to refer to the SDK libraries installed on your computer and the content type data:



Expand All @@ -31,4 +26,4 @@ $AdminUrl="https://tenant.sharepoint.com/sites/powie1"


<br/><br/>
<b>Enjoy and please share feedback!</b>
<b>Enjoy and please share feedback!</b>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
The script is part of the explanation on editing the content types available in the article here:

SharePoint Online content types in Powershell: Edit.
[SharePoint Online content types in Powershell: Edit.](https://social.technet.microsoft.com/wiki/contents/articles/31444.sharepoint-online-content-types-in-powershell-edit.aspx)

This example gets all content types in a single list from a single site, and changes their display form names,using:
This example gets all content types in a single list from a single site, and changes their display form names, using:

```PowerShell
$cc.DisplayFormTemplateName="DocumentLibraryForm"
```
The script requires SharePoint Online SDK installed. Before running the script, enter the information:
The script requires [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038) installed. Before running the script, enter the information:

```PowerShell
# Paths to SDK. Please verify location on your computer.
Expand All @@ -22,4 +22,4 @@ $ListTitle="notf--ked"
```

<br/><br/>
<b>Enjoy and please share feedback!</b>
<b>Enjoy and please share feedback!</b>
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
The script is part of the explanation on editing the content types available in the article here:

SharePoint Online content types in Powershell: Edit.
[SharePoint Online content types in Powershell: Edit.](https://social.technet.microsoft.com/wiki/contents/articles/31444.sharepoint-online-content-types-in-powershell-edit.aspx)

This example changes the display form url of all content types called ITEM (so basically all items in a list) in all lists in one site to the default one.

It allows us also to retract our changes and turn to the default form in case something went wrong with the Custom form and items are no longer viewable. (**[screenshot](https://github.com/PowershellScripts/AllGalleryScriptsSamples/blob/develop/Content%20Types/Display%20Forms/Unable%20to%20view%20items-%20modify%20the%20DisplayFormUrl%20back%20to%20default%20one/DisplayFormUrl4.png)**)




It allows us also to retract our changes and turn to the default form in case something went wrong with the Custom form and items are no longer viewable:











In order to use the script you need SharePoint Online SDK installed. Before running the script modify the following lines to refer to the SDK libraries installed on your computer and the content type data:
In order to use the script you need [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038) installed. Before running the script modify the following lines to refer to the SDK libraries installed on your computer and the content type data:



Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
The script is part of the explanation on editing the content types available in the article here:

SharePoint Online content types in Powershell: Edit.



This example retrieves all content types from a Content Type Hub, along with their DisplayFormTemplateName property. For instruction how to find a content type hub, you can refer here.



[SharePoint Online content types in Powershell: Edit.](https://social.technet.microsoft.com/wiki/contents/articles/31444.sharepoint-online-content-types-in-powershell-edit.aspx)


This example retrieves all content types from a Content Type Hub, along with their DisplayFormTemplateName property. For instruction how to find a content type hub, you can refer [here](https://social.technet.microsoft.com/wiki/contents/articles/31051.sharepoint-online-content-types-in-powershell-add.aspx#To_Content_Hub).





The script requires SharePoint Online SDK installed. Before running the script, enter the information:
The script requires [SharePoint Online SDK](https://www.microsoft.com/en-us/download/details.aspx?id=42038) installed. Before running the script, enter the information:

```PowerShell
# Paths to SDK. Please verify location on your computer.
Expand All @@ -28,9 +18,9 @@ $Username="admin@tenant.onmicrosoft.com"
$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
$AdminUrl="https://tenant.sharepoint.com/sites/contenttypehub"
```
You can export the results to the CSV or .txt file.
You can export the results to the CSV or *.txt* file.



<br/><br/>
<b>Enjoy and please share feedback!</b>
<b>Enjoy and please share feedback!</b>
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,16 @@ Script is part of the explanation of the difference between Web.AvailableContent



SharePoint Online content types in Powershell: Get
[SharePoint Online content types in Powershell: Get](https://social.technet.microsoft.com/wiki/contents/articles/31151.sharepoint-online-content-types-in-powershell-get.aspx)


The script compares the number of items in the two content type collections.





The script compares the number of items in the two content type collections. ([screenshot](https://github.com/PowershellScripts/AllGalleryScriptsSamples/blob/develop/Content%20Types/Get/Compare%20Web.AvailableContentTypes%20vs%20Web.ContentTypes/SubsiteCT2.PNG))


Before running, don't forget to open the file and enter your data:





PowerShell
```PowerShell
# Paths to SDK. Please verify location on your computer.
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
Expand All @@ -28,7 +20,7 @@ Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extens
$Username="admin@tenant.onmicrosoft.com"
$AdminPassword=Read-Host -Prompt "Password" -AsSecureString
$AdminUrl="https://tenant.sharepoint.com/sites/teamsitewithlibraries/subsite"
```

<br/><br/>
<b>Enjoy and please share feedback!</b>
<b>Enjoy and please share feedback!</b>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
A short script to find all content types added to all of your lists in a given site collection and its subsites.
A short script to find all content types added to all of your lists **in a given site collection and its subsites**.



Expand All @@ -16,13 +16,11 @@ when trying to remove a content type.



<h3>How to use?</h3>
### *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)

Expand All @@ -39,18 +37,14 @@ $AdminPassword=Read-Host -Prompt "Password" -AsSecureString
$AdminUrl="https://tenant.sharepoint.com/sites/teamsitewithlibraries"
```

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

a) Find on your computer where SharePoint.Clitent.dll and SharePoint.Client.Runtime.dll libraries are located and insert the correct paths </br>
b) Instead of "admin@tenant.onmicrosoft.com" enter you username </br>
c) Instead of "https://tenant.sharepoint.com/sites/teamsitewithlibraries" enter the name of the site collection where you want to find the content types </br>

5. Run the script in Powershell (any module).

6. The result should show the table of names and associated lists and websites where those lists are located
<img src="../Find content types added to your lists (recursive)/recursiveResult.PNG" width="850">




You can also export it to CSV:

Expand All @@ -59,4 +53,4 @@ You can also export it to CSV:


<br/><br/>
<b>Enjoy and please share feedback!</b>
<b>Enjoy and please share feedback!</b>
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ Very useful if you receive an error message:

when trying to remove a content type.




### How to use?

### *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)

Expand All @@ -35,19 +31,18 @@ $AdminPassword=Read-Host -Prompt "Password" -AsSecureString
$AdminUrl="https://tenant.sharepoint.com/sites/teamsitewithlibraries"
```

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
a) Find on your computer where SharePoint.Clitent.dll and SharePoint.Client.Runtime.dll libraries are located and insert the correct paths </br>
b) Instead of "admin@tenant.onmicrosoft.com" enter you username </br>
c) Instead of "https://tenant.sharepoint.com/sites/teamsitewithlibraries" enter the name of the site collection where you want to find the content types </br>


5. Run the script in Powershell (any module).

6. The result should show the list names in green and connected content types below them

<img src="../Find content types added to your lists/result.PNG" width="850">
<img src="../Find content types added to your lists/result.PNG" width="400">




<br/><br/>
<b>Enjoy and please share feedback!</b>
<b>Enjoy and please share feedback!</b>
Loading