Skip to content
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
12 changes: 9 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ namespace PnP.PowerShell.Commands.FeatureArea
- PascalCase for classes, methods, properties, public fields
- camelCase for parameters, local variables, private fields
- Prefix interfaces with `I` (e.g., `IListItem`)
4. **Null Checking**: Use null-conditional operators (`?.`, `??`) where appropriate
5. **LINQ**: Prefer LINQ for collection operations
6. **Async/Await**: Use async patterns for asynchronous operations
4. **Models and Enums**: Keep model classes in separate files and place enums under `src/Commands/Enums` instead of grouping multiple classes and enums in one model file.
5. **Null Checking**: Use null-conditional operators (`?.`, `??`) where appropriate
6. **LINQ**: Prefer LINQ for collection operations
7. **Async/Await**: Use async patterns for asynchronous operations

### Code Analysis
- EnforceCodeStyleInBuild is enabled
Expand Down Expand Up @@ -265,6 +266,11 @@ Description of output type.
When generating or modifying code:
- Always check existing cmdlets in the same feature area for patterns
- Maintain consistency with existing code style
- Add XML code comments to utility classes and enum classes to explain classes and members; cmdlet classes do not need inline comments
- Keep cmdlet documentation in sync: create documentation markdown files under `/documentation/` for new cmdlets, delete documentation for removed cmdlets, and update documentation when cmdlets change
- In cmdlet documentation markdown files, list parameter subsections in the `## PARAMETERS` section alphabetically
- Keep `src/Commands/CHANGELOG.md` in sync for cmdlet changes: add a brief entry under the appropriate `Current nightly` subsection (`Added`, `Changed`, `Fixed`, or `Removed`) and mention the specific cmdlet names that were added, changed, fixed, or removed
- Add future repository-specific guidance and memory items to this root-level `.github/copilot-instructions.md` file rather than workspace-local instruction files
- Consider cross-platform compatibility
- Remember that this module runs in PowerShell 7.4+ (not Windows PowerShell 5.1)
- Use modern C# 12 features where appropriate
Expand Down
140 changes: 140 additions & 0 deletions documentation/Add-PnPTodoTaskFileAttachment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
Module Name: PnP.PowerShell
title: Add-PnPTodoTaskFileAttachment
schema: 2.0.0
applicable: SharePoint Online
external help file: PnP.PowerShell.dll-Help.xml
online version: https://pnp.github.io/powershell/cmdlets/Add-PnPTodoTaskFileAttachment.html
---

# Add-PnPTodoTaskFileAttachment

## SYNOPSIS

**Required Permissions**

* Microsoft Graph API : Tasks.ReadWrite

Adds a file attachment to a Todo task.

## SYNTAX

```powershell
Add-PnPTodoTaskFileAttachment [-List] <String> [-Task] <TodoTaskPipeBind> [-Path] <String> [-Name <String>] [-ContentType <String>] [-User <EntraIDUserPipeBind>]
```

## DESCRIPTION
Use the cmdlet to add a small file attachment to a Todo task.

## EXAMPLES

### EXAMPLE 1
```powershell
Add-PnPTodoTaskFileAttachment -List "Travel items" -Task "AAMkAGU4MGE1OTRiLTUzMGEtNDRjZi05ZmVm" -Path "c:\temp\passport.pdf" -ContentType "application/pdf"
```

This will add the file as an attachment to the specified Todo task.

## 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
```

### -ContentType
Optional MIME content type for the attachment. If omitted, application/octet-stream will be used.

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

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

### -List
Id or display name of the Todo list.

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

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

### -Name
Optional display name for the attachment. If omitted, the local file name will be used.

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

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

### -Path
Path to the local file to attach.

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

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

### -Task
Id of the Todo task or an instance returned by `Get-PnPTodoTask`.

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

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

### -User
The UPN, Id or instance of an Entra ID user for which you would like to add the file attachment.

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

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

## RELATED LINKS

[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
42 changes: 28 additions & 14 deletions documentation/Get-PnPTodoList.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Get-PnPTodoList [[-Identity] <String>] [-[User] <EntraIDUserPipeBind>]
```

## DESCRIPTION
Use the cmdlet to retrieve all Todo lists or a specific Todo list.
Use the cmdlet to retrieve all Todo lists or a specific Todo list by Id or display name.

## EXAMPLES

Expand All @@ -37,32 +37,46 @@ This will return all your (logged-in user) todo lists.

### EXAMPLE 2
```powershell
Get-PnPTodoList -Identity "AAMkAGU4MGE1OTRiLTUzMGEtNDRjZi05ZmVmLWFiMTkyYmQxODRjOQAuAAAAAACQV8RStyZCQJ4ydzjIK5HmAQD2LFcxdwYMRqbupn47nEYYAASUnLfyAAA="
Get-PnPTodoList -Identity "ABCkAGU4MGE1OTRiLTUzMGEtNDRjZi05ZmVmLWFiMTkyYmQxODRjOQAuAAAAAACQV8RStyZCQJ4ydzjIK5HmAQD2LFcxdwYMRqbupn47nEYYAASUnLfyAAA="
```

This will return your (logged-in user) todo list with the specified Id.

### EXAMPLE 3
```powershell
Get-PnPTodoList -Identity "Travel items"
```

This will return your (logged-in user) todo list with the specified display name.

### EXAMPLE 4
```powershell
Get-PnPTodoList -User john@doe.com
```

This will return the todo lists for the user john.

### EXAMPLE 4
### EXAMPLE 5
```powershell
Get-PnPTodoList -User john@doe.com -Identity "AAMkAGU4MGE1OTRiLTUzMGEtNDRjZi05ZmVmLWFiMTkyYmQxODRjOQAuAAAAAACQV8RStyZCQJ4ydzjIK5HmAQD2LFcxdwYMRqbupn47nEYYAASUnLfyAAA="
Get-PnPTodoList -User john@doe.com -Identity "ABCMkAGU4MGE1OTRiLTUzMGEtNDRjZi05ZmVmLWFiMTkyYmQxODRjOQAuAAAAAACQV8RStyZCQJ4ydzjIK5HmAQD2LFcxdwYMRqbupn47nEYYAASUnLfyAAA="
```

This will return the todo list for the user john with specified Id.
This will return the todo list for the user john with the specified Id.

### EXAMPLE 6
```powershell
Get-PnPTodoList -User john@doe.com -Identity "Travel items"
```

This will return the todo list for the user john with the specified display name.

## PARAMETERS

### -Identity
Id of the Todo list.
### -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: String
Type: PnPConnection
Parameter Sets: (All)

Required: False
Expand All @@ -72,11 +86,11 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -User
The UPN, Id or instance of an Entra ID user for which you would like to retrieve the todo list available to this user
### -Identity
Id or display name of the Todo list.

```yaml
Type: EntraIDUserPipeBind
Type: String
Parameter Sets: (All)

Required: False
Expand All @@ -86,11 +100,11 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -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.
### -User
The UPN, Id or instance of an Entra ID user for which you would like to retrieve the todo list available to this user

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

Required: False
Expand Down
127 changes: 127 additions & 0 deletions documentation/Get-PnPTodoTask.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
Module Name: PnP.PowerShell
title: Get-PnPTodoTask
schema: 2.0.0
applicable: SharePoint Online
external help file: PnP.PowerShell.dll-Help.xml
online version: https://pnp.github.io/powershell/cmdlets/Get-PnPTodoTask.html
---

# Get-PnPTodoTask

## SYNOPSIS

**Required Permissions**

* Microsoft Graph API : One of Tasks.Read, Tasks.ReadWrite, Tasks.Read.All

Gets one Todo task or all Todo tasks from a Todo list by list Id or display name.

## SYNTAX

```powershell
Get-PnPTodoTask [-List] <TodoTaskPipeBind> [[-Identity] <TodoTaskPipeBind>] [-User <EntraIDUserPipeBind>]
```

## DESCRIPTION
Use the cmdlet to retrieve all Todo tasks from a Todo list or a specific Todo task. The Todo list can be specified by Id or display name.

## EXAMPLES

### EXAMPLE 1
```powershell
Get-PnPTodoTask -List "AQMkADAwATM0MDAAMS0yMDkyLTllN2QtMDACLTAwCgAuAAAD"
```

This will return all tasks from the specified Todo list associated with your logged-in user account.

### EXAMPLE 2
```powershell
Get-PnPTodoTask -List "Travel items"
```

This will return all tasks from the Todo list with the specified display name associated with your logged-in user account.

### EXAMPLE 3
```powershell
Get-PnPTodoTask -List "AQMkADAwATM0MDAAMS0yMDkyLTllN2QtMDACLTAwCgAuAAAD" -Identity "AAMkAGU4MGE1OTRiLTUzMGEtNDRjZi05ZmVmLWFiMTkyYmQxODRjOQAuAAAAAACQV8RStyZCQJ4ydzjIK5HmAQD2LFcxdwYMRqbupn47nEYYAASUnLfyAAA="
```

This will return the specified Todo task from the specified Todo list associated with your logged-in user account.

### EXAMPLE 4
```powershell
Get-PnPTodoTask -User john@doe.com -List "AQMkADAwATM0MDAAMS0yMDkyLTllN2QtMDACLTAwCgAuAAAD"
```

This will return all tasks from the specified Todo list associated with John's account.

### EXAMPLE 5
```powershell
Get-PnPTodoTask -User john@doe.com -List "Travel items"
```

This will return all tasks from the Todo list with the specified display name associated with John's account.

## 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
Id of the Todo task or an instance returned by `Get-PnPTodoTask`.

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

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

### -List
Id or display name of the Todo list.

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

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

### -User
The UPN, Id or instance of an Entra ID user for which you would like to retrieve Todo tasks.

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

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

## RELATED LINKS

[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)

Loading
Loading