Skip to content

Commit

Permalink
Merge branch 'dev' into fixes/BatchTaxonomyListItem
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamdsheth authored Dec 15, 2024
2 parents 680b8bb + eab639e commit e437073
Show file tree
Hide file tree
Showing 53 changed files with 6,524 additions and 5,913 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `-Contributors` and `-Managers` parameters to `New-PnPTermGroup` and `Set-PnPTermGroup` cmdlets.
- Added `-Files` parameter for `Send-PnPMail` cmdlet to allow files to be downloaded from SharePoint and then sent as attachments.
- Added `-Force` parameter to `Set-PnPPropertyBagValue` cmdlet to toggle NoScript status of the site.
- Added `-Batch` parameter to `Invoke-PnPGraphMethod` cmdlet to allow adding request in a batch.
- Added `-List` parameter to `Get-PnPFolderItem`, `Get-PnPFileInFolder` and `Get-PnPFolderInFolder` which allows them to work with a document library containing more than 5,000 items [#4611](https://github.com/pnp/powershell/pull/4611)
- Added `Start-PnPTraceLog`, `Stop-PnPTraceLog` and `Get-PnPTraceLog` cmdlets to handle tracelogging. Removed `Set-PnPTraceLog` cmdlet.
- Added `-ListPermissionScopes` parameter on `Get-PnPAccessToken` cmdlet to list the current permission scopes on the current access token.
- Added `Get-PnPCopilotAgent` cmdlet that returns the Microsoft Copilot Agents in a site collection

### Changed

Expand Down Expand Up @@ -109,9 +114,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Removed `-WebLogin` parameter from `Connect-PnPOnline` cmdlet. It was marked obsolete and was a security risk.
- Removed `Set-PnPMinimalDownloadStrategy` as it's not applicable anymore to SharePoint Online. If you need the functionality you can always turn on the feature with `Enable-PnPFeature -Id 87294c72-f260-42f3-a41b-981a2ffce37a` or turn it off with `Disable-PnPFeature -Id 87294c72-f260-42f3-a41b-981a2ffce37a`
- Removed `-SPOManagementShell` parameter from `Connect-PnPOnline` cmdlet. It reduces the risk of changes coming from Microsoft. Use your own Entra ID app instead.
- Removed `Set-PnPTraceLog` cmdlet and introduced `Start-PnPTraceLog` and `Stop-PnPTraceLog` with similar parameters.

### Contributors

- Arjan Cornelissen [arjancornelissen]
- Konrad K. [wilecoyotegenius]
- Antti K. Koskela [koskila]
- Steve Beaugé [stevebeauge]
Expand Down
1 change: 1 addition & 0 deletions MIGRATE-2.0-to-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Recommend referring to these 2 links:
| Register-PnPEntraIDAppForInteractiveLogin | Removed `-LaunchBrowser`, `-NoPopup` and credential based auth. The default auth method is now Interactive.|
| Set-PnPMinimalDownloadStrategy | Removed cmdlet. If you need the functionality you can always turn on the feature with `Enable-PnPFeature -Id 87294c72-f260-42f3-a41b-981a2ffce37a` or turn it off with `Disable-PnPFeature -Id 87294c72-f260-42f3-a41b-981a2ffce37a` |
| Connect-PnPOnline | Removed `-SPOManagementShell` option for authentication. It reduces the risk of changes from Microsoft which can potentially break the scripts . Use your own Entra ID app instead via `-ClientId` parameter. |
| Set-PnPTraceLog | Removed cmdlet and introduced `Start-PnPTraceLog` and `Stop-PnPTracelog` with similar parameters and functionality |

## Other notable changes

Expand Down
8 changes: 4 additions & 4 deletions dependencies.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Updated": "20241130-024739",
"PnPPowerShell": "3f644bb639eb2454e181077b09c58b8c4a341114",
"PnPFramework": "79a4ab2d889a61f693777d517fdb76b8428d0bff",
"PnPCore": "b4011dcffc2ec7bab3455abb0b59a9a8336989fd"
"Updated": "20241215-025730",
"PnPPowerShell": "299de9de420a6aacf4e3de62a6d8d572377f770e",
"PnPFramework": "a5b9e781502a19752d98fae0d85e7df826a5f004",
"PnPCore": "d014e37bd2d15827dfe218275760f3326ba54b80"
}
10 changes: 5 additions & 5 deletions documentation/Add-PnPDocumentSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Add-PnPDocumentSet [-List] <ListPipeBind> [-Name] <String> [-ContentType <Conten
```

## DESCRIPTION
Allows to add new document set to library.
Allows to add new document set to the library.

## EXAMPLES

Expand All @@ -31,10 +31,10 @@ Add-PnPDocumentSet -List "Documents" -ContentType "Test Document Set" -Name "Tes

### EXAMPLE 2
```powershell
Add-PnPDocumentSet -List "Documents" -ContentType "Test Document Set" -Name "Test" -Folder "Projects/Europe"
Add-PnPDocumentSet -List "Documents" -ContentType "Test Document Set" -Name "Test" -Folder "Documents/Projects/Europe"
```

This will add a new document set based upon the 'Test Document Set' content type to a list called 'Documents'. The document set will be named 'Test' and will be added to the 'Europe' folder which is located in the 'Projects' folder. Folders will be created if needed.
This will add a new document set based upon the 'Test Document Set' content type to a list called 'Documents'. The document set will be named 'Test' and will be added to the 'Europe' folder, which is located in the 'Projects' folder. Folders will be created if needed.

## PARAMETERS

Expand All @@ -53,7 +53,7 @@ Accept wildcard characters: False
```
### -ContentType
The name of the content type, its ID or an actual content object referencing to the document set
The name of the content type, its ID, or an actual content object referencing the document set
```yaml
Type: ContentTypePipeBind
Expand Down Expand Up @@ -81,7 +81,7 @@ Accept wildcard characters: False
```
### -List
The name of the list, its ID or an actual list object from where the document set needs to be added
The name of the list, its ID, or an actual list object from where the document set needs to be added
```yaml
Type: ListPipeBind
Expand Down
2 changes: 1 addition & 1 deletion documentation/Connect-PnPOnline.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ Accept wildcard characters: False
```
### -PersistLogin
Persist the current access token and related information in a locally stored cache. This cache will be retained between PowerShell sessions and will also be available after a reboot. You only need to provide this switch one time on Connect-PnPOnline cmdlet, it will after that retain the information and reuse it for new connections to the same tenant. If you want to clear the cache entry, use `Disconnect-PnPOnline -ClearPersistedLogin`
Persist the current access token and related information in a locally stored cache. This cache will be retained between PowerShell sessions and will also be available after a reboot. You only need to provide this switch one time on Connect-PnPOnline cmdlet, it will after that retain the information and reuse it for new connections to the same tenant. Notice that while using a cached token, if you change the permissions of an application registration, the token associated with that registration will not be updated automatically in the cache. You will have to clear the cache entry first and reauthenticate: use `Disconnect-PnPOnline -ClearPersistedLogin`

```yaml
Type: SwitchParameter
Expand Down
2 changes: 1 addition & 1 deletion documentation/Disconnect-PnPOnline.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Disconnect-PnPOnline [-ClearPersistedLogin]

## DESCRIPTION

Disconnects the current connection and clears its token cache. It will require you to build up a new connection again using [Connect-PnPOnline](Connect-PnPOnline.md) in order to use any of the PnP PowerShell cmdlets. You will have to reauthenticate. If instead you simply want to connect to another site collection within the same tenant using the same credentials you used previously, do not use this cmdlet but instead use `Connect-PnPOnline -Url https://tenant.sharepoint.com/sites/othersite` instead without disconnecting. It will try to reuse the existing authentication method and cached credentials.
Disconnects the current connection and optionally clears its token cache. It will require you to build up a new connection again using [Connect-PnPOnline](Connect-PnPOnline.md) in order to use any of the PnP PowerShell cmdlets. You might have to reauthenticate. If instead you simply want to connect to another site collection within the same tenant using the same credentials you used previously, do not use this cmdlet but instead use `Connect-PnPOnline -Url https://tenant.sharepoint.com/sites/othersite` instead without disconnecting. It will try to reuse the existing authentication method and cached credentials.

Note that this cmdlet does not support passing in a specific connection to disconnect. If you wish to dispose a specific connection you have set up in a variable using `$variable = Connect-PnPOnline -ReturnConnection`, just dispose that variable using `$variable = $null` and it will be cleared from memory.

Expand Down
45 changes: 43 additions & 2 deletions documentation/Get-PnPAccessToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,33 @@ If a Resource Type Name or Resource URL is specified, it will fetch the access t

## SYNTAX

### Graph Token

```powershell
Get-PnPAccessToken [-ResourceTypeName] [-Decoded] [-Scopes] [-Connection <PnPConnection>]
```

### Specific resource by type

```powershell
Get-PnPAccessToken -ResourceTypeName <ResourceTypeName> [-Decoded] [-Scopes] [-Connection <PnPConnection>]
```

### Specific resource by URL

```powershell
Get-PnPAccessToken [-ResourceTypeName] [-ResourceUrl] [-Decoded] [-Scopes] [-Connection <PnPConnection>]
Get-PnPAccessToken -ResourceUrl <String> [-Decoded] [-Scopes] [-Connection <PnPConnection>]
```

### List Permission Scopes in current access token

```powershell
Get-PnPAccessToken -ListPermissionScopes [-ResourceTypeName <String>]
```


## DESCRIPTION
Gets the OAuth 2.0 Access Token.
Returns the OAuth 2.0 Access Token.

## EXAMPLES

Expand Down Expand Up @@ -59,6 +80,13 @@ Get-PnPAccessToken -ResourceUrl "https://management.azure.com/.default"

Gets the OAuth 2.0 Access Token to consume the SharePoint APIs and perform CSOM operations.

### EXAMPLE 6
```powershell
Get-PnPAccessToken -ListPermissionScopes
```

Lists the current permission scopes for the Microsoft Graph API on the access token. Specify -ResourceTypeName to list permissions for other resource types, like SharePoint.

## PARAMETERS

### -ResourceTypeName
Expand Down Expand Up @@ -132,6 +160,19 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ListPermissionScopes
If specified the current permission scopes on the access token will be listed
```yaml
Type: SwitchParameter
Parameters Set: List Permission Scopes
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
## RELATED LINKS
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
105 changes: 105 additions & 0 deletions documentation/Get-PnPCopilotAgent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---
document type: cmdlet
external help file: PnP.PowerShell.dll-Help.xml
HelpUri: ''
Locale: en-US
Module Name: PnP.PowerShell
ms.date: 12/06/2024
PlatyPS schema version: 2024-05-01
title: Get-PnPCopilotAgent
---

# Get-PnPCopilotAgent

## SYNOPSIS

Returns the Microsoft Copilot Agents (*.agent) in a site collection.

## SYNTAX

### __AllParameterSets

```powershell
Get-PnPCopilotAgent [-ServerRelativeUrl <string>] [-Connection <PnPConnection>] [<CommonParameters>]
```

## DESCRIPTION

This cmdlet iterates through the document libraries in a site and finds the copilot agents in that site.

## EXAMPLES

### Example 1

```powershell
Get-PnPCopilotAgent
```

This will return all the Microsoft Copilot agents in a site.


### Example 2

```powershell
Get-PnPCopilotAgent -ServerRelativeUrl /sites/demo/siteassets/copilots/approved/main.agent
```

This will return the specific Microsoft Copilot agent if it exists.


## 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: PnP.PowerShell.Commands.Base.PnPConnection
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```
### -ServerRelativeUrl
The server relative URL to the .agent file.
```yaml
Type: System.String
DefaultValue: ''
SupportsWildcards: false
ParameterValue: []
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```
### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
## RELATED LINKS
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
21 changes: 21 additions & 0 deletions documentation/Get-PnPFileInFolder.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ Get-PnPFileInFolder [-FolderSiteRelativeUrl <String>] [-ItemName <String>] [-Rec
Get-PnPFileInFolder [-Identity <FolderPipeBind>] [-ItemName <String>] [-Recurse] [-Includes <String[]>] [-ExcludeSystemFolders] [-Verbose] [-Connection <PnPConnection>]
```

### Folder via list pipebind
```powershell
Get-PnPFileInFolder [-List <ListPipeBind>] [-ItemType <String>] [-ItemName <String>] [-Includes <String[]>] [-Verbose] [-Connection <PnPConnection>]
```

## DESCRIPTION

This cmdlet allows listing of all the files in a folder. It can optionally also list all files in the underlying subfolders.

When working with a document library containing over 5,000 items in it, you will need to use the -List parameter to specify the document library in order to be able to retrieve the files in it. It will always recursively retrieve all files in the document library. You can also use -Includes to fetch additional properties of the files.

## EXAMPLES

### EXAMPLE 1
Expand Down Expand Up @@ -165,6 +172,20 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -List
The document library to retrieve the files from. This parameter is required when working with document libraries containing over 5,000 items.
```yaml
Type: ListPipeBind
Parameter Sets: Folder via list pipebind

Required: False
Position: 0
Default value: None
Accept pipeline input: True
Accept wildcard characters: False
```
### -Recurse
A switch parameter to include files of all subfolders in the specified folder
Expand Down
21 changes: 21 additions & 0 deletions documentation/Get-PnPFolderInFolder.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ Get-PnPFolderInFolder [-FolderSiteRelativeUrl <String>] [-ItemName <String>] [-E
Get-PnPFolderInFolder [-Identity <FolderPipeBind>] [-ItemName <String>] [-ExcludeSystemFolders] [-Includes <String[]>] [-Recurse] [-Verbose] [-Connection <PnPConnection>]
```

### Folder via list pipebind
```powershell
Get-PnPFolderInFolder [-List <ListPipeBind>] [-ItemType <String>] [-ItemName <String>] [-Includes <String[]>] [-Verbose] [-Connection <PnPConnection>]
```

## DESCRIPTION

This cmdlet allows listing of all the subfolders of a folder. It can optionally also list all folders in the underlying subfolders.

When working with a document library containing over 5,000 items in it, you will need to use the -List parameter to specify the document library in order to be able to retrieve the Folders in it. It will always recursively retrieve all folders in the document library. You can also use -Includes to fetch additional properties of the folders.

## EXAMPLES

### EXAMPLE 1
Expand Down Expand Up @@ -165,6 +172,20 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -List
The document library to retrieve the folders from. This parameter is required when working with document libraries containing over 5,000 items.
```yaml
Type: ListPipeBind
Parameter Sets: Folder via list pipebind

Required: False
Position: 0
Default value: None
Accept pipeline input: True
Accept wildcard characters: False
```
### -Recurse
A switch parameter to include folders of all subfolders in the specified folder
Expand Down
Loading

0 comments on commit e437073

Please sign in to comment.