Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Added Connection parameter #3441

Merged
merged 5 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 22 additions & 8 deletions documentation/Add-PnPMicrosoft365GroupMember.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ title: Add-PnPMicrosoft365GroupMember

* Microsoft Graph API: All of Group.ReadWrite.All, User.ReadWrite.All

Adds members to a particular Microsoft 365 Group
Adds members to a particular Microsoft 365 Group.

## SYNTAX

```powershell
Add-PnPMicrosoft365GroupMember -Identity <Microsoft365GroupPipeBind> -Users <String[]> [-RemoveExisting]
Add-PnPMicrosoft365GroupMember -Identity <Microsoft365GroupPipeBind> -Users <String[]> [-RemoveExisting] [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand All @@ -34,19 +34,33 @@ Allows to add multiple users to Microsoft 365 Group.
Add-PnPMicrosoft365GroupMember -Identity "Project Team" -Users "[email protected]","[email protected]"
```

Adds the provided two users as additional members to the Microsoft 365 Group named "Project Team"
Adds the provided two users as additional members to the Microsoft 365 Group named "Project Team".

### EXAMPLE 2
```powershell
Add-PnPMicrosoft365GroupMember -Identity "Project Team" -Users "[email protected]","[email protected]" -RemoveExisting
```

Sets the provided two users as the only members of the Microsoft 365 Group named "Project Team" by removing any current existing members first
Sets the provided two users as the only members of the Microsoft 365 Group named "Project Team" by removing any current existing members first.

## PARAMETERS

### -Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

```yaml
Type: PnPConnection
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Identity
The Identity of the Microsoft 365 Group to add members to
The Identity of the Microsoft 365 Group to add members to.

```yaml
Type: Microsoft365GroupPipeBind
Expand All @@ -60,7 +74,7 @@ Accept wildcard characters: False
```

### -RemoveExisting
If provided, all existing members will be removed and only those provided through Users will become members
If provided, all existing members will be removed and only those provided through Users will become members.

```yaml
Type: SwitchParameter
Expand All @@ -74,7 +88,7 @@ Accept wildcard characters: False
```

### -Users
The UPN(s) of the user(s) to add to the Microsoft 365 Group as a member
The UPN(s) of the user(s) to add to the Microsoft 365 Group as a member.

```yaml
Type: String[]
Expand All @@ -90,4 +104,4 @@ Accept wildcard characters: False
## RELATED LINKS

[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
[Microsoft Graph documentation](https://learn.microsoft.com/graph/api/group-post-members)
[Microsoft Graph documentation](https://learn.microsoft.com/graph/api/group-post-members)
26 changes: 20 additions & 6 deletions documentation/Add-PnPMicrosoft365GroupOwner.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Adds users to a Microsoft 365 Group as Owners.
## SYNTAX

```powershell
Add-PnPMicrosoft365GroupOwner -Identity <Microsoft365GroupPipeBind> -Users <String[]> [-RemoveExisting]
Add-PnPMicrosoft365GroupOwner -Identity <Microsoft365GroupPipeBind> -Users <String[]> [-RemoveExisting] [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand All @@ -34,19 +34,33 @@ Allows to add multiple users to Microsoft 365 Group as owners.
Add-PnPMicrosoft365GroupOwner -Identity "Project Team" -Users "[email protected]","[email protected]"
```

Adds the provided two users as additional owners to the Microsoft 365 Group named "Project Team"
Adds the provided two users as additional owners to the Microsoft 365 Group named "Project Team".

### EXAMPLE 2
```powershell
Add-PnPMicrosoft365GroupOwner -Identity "Project Team" -Users "[email protected]","[email protected]" -RemoveExisting
```

Sets the provided two users as the only owners of the Microsoft 365 Group named "Project Team" by removing any current existing members first
Sets the provided two users as the only owners of the Microsoft 365 Group named "Project Team" by removing any current existing members first.

## PARAMETERS

### -Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

```yaml
Type: PnPConnection
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Identity
The Identity of the Microsoft 365 Group to add owners to
The Identity of the Microsoft 365 Group to add owners to.

```yaml
Type: Microsoft365GroupPipeBind
Expand All @@ -60,7 +74,7 @@ Accept wildcard characters: False
```

### -RemoveExisting
If provided, all existing owners will be removed and only those provided through Users will become owners
If provided, all existing owners will be removed and only those provided through Users parameter will become owners.

```yaml
Type: SwitchParameter
Expand All @@ -74,7 +88,7 @@ Accept wildcard characters: False
```

### -Users
The UPN(s) of the user(s) to add to the Microsoft 365 Group as an owner
The UPN(s) of the user(s) to add to the Microsoft 365 Group as an owner.

```yaml
Type: String[]
Expand Down