File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
2525- Added ` Import-PnPFlow ` cmdlet to import Power Automate in the tenant. [ #4854 ] ( https://github.com/pnp/powershell/pull/4854 )
2626- Marked ` -Force ` as obsolete within Enable-PnPFeature cmdlet . [ #5146 ] ( https://github.com/pnp/powershell/pull/5146 )
2727- Added ` Remove-PnPPowerAppPermission ` cmdlet to remove Power Apps permissions. [ #5168 ] ( https://github.com/pnp/powershell/pull/5168 )
28+ - Added support for ` -ClearGroupId ` parameter in ` Set-PnPSite ` and ` Set-PnPTenantSite ` cmdlets. [ #5192 ] ( https://github.com/pnp/powershell/pull/5192 )
2829
2930### Changed
3031- Improved ` Get-PnPTerm ` cmdlet to show a better error message. [ #4933 ] ( https://github.com/pnp/powershell/pull/4933 )
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ public class SetSite : PnPSharePointCmdlet
141141 public SwitchParameter ReadOnlyForBlockDownloadPolicy ;
142142
143143 [ Parameter ( Mandatory = false , ParameterSetName = ParameterSet_PROPERTIES ) ]
144- public SwitchParameter ? ClearGroupId ;
144+ public SwitchParameter ClearGroupId ;
145145
146146 [ Parameter ( Mandatory = false , ParameterSetName = ParameterSet_LOCKSTATE ) ]
147147 public SwitchParameter Wait ;
@@ -461,9 +461,9 @@ protected override void ExecuteCmdlet()
461461 executeQueryRequired = true ;
462462 }
463463
464- if ( ClearGroupId . HasValue )
464+ if ( ParameterSpecified ( nameof ( ClearGroupId ) ) && ClearGroupId . IsPresent )
465465 {
466- siteProperties . ClearGroupId = ClearGroupId . Value ;
466+ siteProperties . ClearGroupId = ClearGroupId . ToBool ( ) ;
467467 executeQueryRequired = true ;
468468 }
469469
@@ -527,6 +527,6 @@ private bool IsTenantProperty() =>
527527 HidePeopleWhoHaveListsOpen . HasValue ||
528528 ParameterSpecified ( nameof ( ExcludeBlockDownloadSharePointGroups ) ) ||
529529 ReadOnlyForBlockDownloadPolicy . IsPresent ||
530- ClearGroupId . HasValue ;
530+ ClearGroupId . IsPresent ;
531531 }
532532}
You can’t perform that action at this time.
0 commit comments