You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/en/spo/ctremove.md
+28-4
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ Step 6. Either delete the items or change their content type under properties.
61
61
62
62
# Powershell
63
63
64
-
It works better if you don't know in which list the content type is bein used. Powershell allows you to scan through multiple lists quickly.
64
+
Powershell is a better choice if you don't know in which list the content type is being used and there is a lot of them. Powershell allows you to scan through multiple lists quickly.
65
65
66
66
### With content type name
67
67
Content type name is easier because you already know the name of your content type. However, if there is a chance that you may have 2 different content types with the same name, you should be using the script with content type id, not name. For a script with content type id, scroll below.
@@ -83,7 +83,7 @@ $results = @()
83
83
84
84
foreach ($list in $lists) {
85
85
# Skip hidden or system lists
86
-
if ($list.Hidden -or $list.BaseTemplate -eq 101) { # 101 is the template ID for document libraries
86
+
if ($list.Hidden) {
87
87
continue
88
88
}
89
89
@@ -148,7 +148,7 @@ $results = @()
148
148
149
149
foreach ($list in $lists) {
150
150
# Skip hidden or system lists
151
-
if ($list.Hidden -or $list.BaseTemplate -eq 101) { # 101 is the template ID for document libraries
0 commit comments