@@ -65,6 +65,14 @@ public bool
65
65
[ Parameter ( Mandatory = false , HelpMessage = "Hide the list from the SharePoint UI. Set to $true to hide, $false to show." ) ]
66
66
public bool Hidden ;
67
67
68
+ [ Parameter ( Mandatory = false , HelpMessage = "Enable or disable force checkout. Set to $true to enable, $false to disable." ) ]
69
+ public bool ForceCheckout ;
70
+
71
+ #if ! ONPREMISES
72
+ [ Parameter ( Mandatory = false , HelpMessage = "Set the list experience: Auto, NewExperience or ClassExperience" ) ]
73
+ public ListExperience ListExperience ;
74
+ #endif
75
+
68
76
[ Parameter ( Mandatory = false , HelpMessage = "Enable or disable attachments. Set to $true to enable, $false to disable." ) ]
69
77
public bool EnableAttachments ;
70
78
@@ -148,31 +156,49 @@ protected override void ExecuteCmdlet()
148
156
isDirty = true ;
149
157
}
150
158
151
- if ( MyInvocation . BoundParameters . ContainsKey ( "Description" ) )
159
+ if ( MyInvocation . BoundParameters . ContainsKey ( "Description" ) )
152
160
{
153
161
list . Description = Description ;
154
162
isDirty = true ;
155
163
}
156
164
157
- if ( MyInvocation . BoundParameters . ContainsKey ( "EnableFolderCreation" ) )
165
+ if ( MyInvocation . BoundParameters . ContainsKey ( "EnableFolderCreation" ) )
158
166
{
159
167
list . EnableFolderCreation = EnableFolderCreation ;
160
168
isDirty = true ;
161
169
}
162
170
171
+ if ( MyInvocation . BoundParameters . ContainsKey ( "ForceCheckout" ) )
172
+ {
173
+ list . ForceCheckout = ForceCheckout ;
174
+ isDirty = true ;
175
+ }
176
+
177
+ #if ! ONPREMISES
178
+ if ( MyInvocation . BoundParameters . ContainsKey ( "ListExperience" ) )
179
+ {
180
+ list . ListExperienceOptions = ListExperience ;
181
+ isDirty = true ;
182
+ }
183
+ #endif
184
+
163
185
if ( isDirty )
164
186
{
165
187
list . Update ( ) ;
166
188
ClientContext . ExecuteQueryRetry ( ) ;
167
189
}
168
190
isDirty = false ;
169
191
192
+
193
+
194
+
170
195
if ( list . EnableVersioning )
171
196
{
172
197
// list or doclib?
173
198
174
199
if ( list . BaseType == BaseType . DocumentLibrary )
175
200
{
201
+
176
202
if ( MyInvocation . BoundParameters . ContainsKey ( "MajorVersions" ) )
177
203
{
178
204
list . MajorVersionLimit = ( int ) MajorVersions ;
@@ -193,6 +219,8 @@ protected override void ExecuteCmdlet()
193
219
isDirty = true ;
194
220
}
195
221
}
222
+
223
+
196
224
}
197
225
if ( isDirty )
198
226
{
0 commit comments