Skip to content

Commit

Permalink
Merge pull request #3035 from KoenZomers/AdjustAddSiteCollectionAdmin
Browse files Browse the repository at this point in the history
Made `-Owners` optional on `Add-PnPSiteCollectionAdmin`
  • Loading branch information
gautamdsheth authored Apr 22, 2023
2 parents 9e8d444 + eaa9c83 commit f88181c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed issue with `Grant-PnPAzureADAppSitePermission` cmdlet where users are not able to set selected site in the `Sites.Selected` permission. [#2983](https://github.com/pnp/powershell/pull/2983)
- Fixed issue with `Get-PnPList` cmdlet not working with site-relative URL as identity. [#3005](https://github.com/pnp/powershell/pull/3005)
- Fixed issue with `Add-PnPNavigationNode` cmdlet where the target audience would not correctly be set when creating a node as a child of a parent node [#2940](https://github.com/pnp/powershell/pull/2940)
- Fixed issue where `Add-PnPSiteCollectionAdmin -PrimarySiteCollectionAdmin <user>` would require owners to be specified as well

### Contributors

Expand Down
4 changes: 2 additions & 2 deletions documentation/Add-PnPSiteCollectionAdmin.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This will add all users with their title ending with "Doe" as additional seconda

### EXAMPLE 4
```powershell
Add-PnPSiteCollectionAdmin -PrimarySiteCollectionAdminrs "[email protected]"
Add-PnPSiteCollectionAdmin -PrimarySiteCollectionAdmin "[email protected]"
```

This will set [email protected] as the primary site collection administrator of the site collection in the current context
Expand Down Expand Up @@ -74,7 +74,7 @@ Specifies owner(s) to add as site collection administrators. They will be added
Type: System.Collections.Generic.List`1[PnP.PowerShell.Commands.Base.PipeBinds.UserPipeBind]
Parameter Sets: (All)

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/Site/AddSiteCollectionAdmin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace PnP.PowerShell.Commands.Site
[OutputType(typeof(void))]
public class AddSiteCollectionAdmin : PnPSharePointCmdlet
{
[Parameter(Mandatory = true, ValueFromPipeline = true)]
[Parameter(Mandatory = false, ValueFromPipeline = true)]
public List<UserPipeBind> Owners;

[Parameter(Mandatory = false)]
Expand Down

0 comments on commit f88181c

Please sign in to comment.