Skip to content

Commit

Permalink
Merge branch 'dev' into SetSiteHidePeoplePreviewingFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers authored Oct 25, 2024
2 parents b5cd745 + 8dd3d5f commit 9e6d356
Show file tree
Hide file tree
Showing 94 changed files with 5,246 additions and 4,990 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `-Icon` and `-Color` parameters to `Set-PnPList` cmdlet. [#4409](https://github.com/pnp/powershell/pull/4409)
- Added `Remove-PnPTenantRestrictedSearchAllowedList` cmdlet to removes site URLs from the allowed list when Restricted SharePoint Search is enabled. [#4399](https://github.com/pnp/powershell/pull/4399)
- Added `Get-PnPDeletedFlow` cmdlet to retrieve a list of flows which are soft deleted. [#4396](https://github.com/pnp/powershell/pull/4396)
- Added `Restore-PnPFlow` cmdlet which allows for undeleting a flow within 21 days of deletion. [#4415](https://github.com/pnp/powershell/pull/4415)
- Added `-ExcludeDeprecated` to `Export-PnpTaxonomy` which allows for deprecated terms to be excluded from the export [#4053](https://github.com/pnp/powershell/pull/4053)
- Added `-HidePeoplePreviewingFiles` to `Set-PnPSite` which allows for hiding the people previewing files feature on a site [#4416](https://github.com/pnp/powershell/pull/4416)

Expand All @@ -45,6 +46,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- `Remove-PnPContentType` and `Remove-PnPContentTypeFromList` now use PnP Core SDK for processing requests. [#4390](https://github.com/pnp/powershell/pull/4390)
- `Clear-PnPRecycleBinItem` , `Move-PnPRecycleBinItem` and `Restore-PnPRecycleBinItem` cmdlets now use PnP Core SDK for processing requests. [#4393](https://github.com/pnp/powershell/pull/4393/)
- `Get-PnPSearchCrawlLog` cmdlet now shows a warning in case application permissions are used. [#4391](https://github.com/pnp/powershell/pull/4391)
- All Power Platform cmdlets no longer require an environment to be specified. If omitted, the default environment will be retrieved and used. [#4415](https://github.com/pnp/powershell/pull/4415)
- When passing in an existing connection using `-Connection` on `Connect-PnPOnline`, the clientid from the passed in connection will be used for the new connection [#4425](https://github.com/pnp/powershell/pull/4425)
- Removed `-Confirm` parameter from `Remove-PnPUser` and `Remove-PnPAvailableSiteClassification` cmdlets. Use `-Force` instead. [#4455](https://github.com/pnp/powershell/pull/4455)

### Fixed

Expand All @@ -57,7 +61,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fix `Add-PnPDataRowsToSiteTemplate` setting keyColumn to null when not passed. [#4325](https://github.com/pnp/powershell/pull/4325)
- Fix `Connect-PnPOnline` not working correctly when `-DeviceLogin` and `-LaunchBrowser` both are specified. It used to open it in a popup. Now it correctly launches the browser. [#4325](https://github.com/pnp/powershell/pull/4345)
- `Export-PnPUserInfo`, `Export-PnPUserProfile` and `Remove-PnPUserProfile` cmdlets now work properly with proper `-Connection` parameter if specified. [#4389](https://github.com/pnp/powershell/pull/4389)

- Fixed `Get-PnPAzureADAppSitePermission`, `Grant-PnPAzureADAppSitePermission` and `Revoke-PnPAzureADAppSitePermission` cmdlets throwing an error when the site URL is not specified and the app registration used only having Graph permissions [#4421](https://github.com/pnp/powershell/pull/4421)
- Fixed `Get-PnPTerm` cmdlet not working correctly when `-ParentTerm` parameter is specified. [#4454](https://github.com/pnp/powershell/pull/4454)
- Fixed the PnP PowerShell version check to only check nightly version in nightly builds and major version in release builds. [#4453](https://github.com/pnp/powershell/pull/4453)

### Removed

- Removed `Publish-PnPCompanyApp` cmdlet as it was not supported anymore. [#4387](https://github.com/pnp/powershell/pull/4387)
Expand Down
10 changes: 4 additions & 6 deletions MIGRATE-2.0-to-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

_This is a draft document, version 3 is not yet available. You can try this out with the nightly builds starting from 2.99.1 or later_

The 3.x version of PnP PowerShell is based exclusively on .NET 8.0, which means that it will not work on older PowerShell editions like PowerShell 5.1, ISE or PowerShell 7.3 or older. PowerShell 7.4 or later is required.

- The 3.x version of PnP PowerShell will work only on PowerShell 7.4 or later versions.
The 3.x version of PnP PowerShell is based exclusively on .NET 8.0, which means that it will not work on older PowerShell editions like PowerShell 5.1, ISE or PowerShell 7.3 or older. It will work only on **PowerShell 7.4 or later editions.**

## Steps to update from 2.x to 3.x

Expand Down Expand Up @@ -39,7 +37,7 @@ Recommend referring to these 2 links:
- [DevOps Snack: Change PowerShell version in YAML](https://microsoft-bitools.blogspot.com/2021/02/devops-snack-change-powershell-version.html)
- [How to enable PowerShell core in Azure Pipeline?](https://theautomationcode.com/how-to-enable-powershell-core-in-azure-pipeline/)

## Breaking changes
## Breaking changes in 3.0

| **Cmdlet** | **Comment** |
| ----------- | ---------------------- |
Expand All @@ -54,11 +52,11 @@ Recommend referring to these 2 links:
| Get-PnPAppAuthAccessToken | It has been removed. Use `Get-PnPAccessToken -ResourceTypeName SharePoint` instead to get SharePoint access token. |
| Request-PnPAccessToken | It has been removed. Use `Get-PnPAccessToken` instead. |
| Get-PnPGraphAccessToken | It has been removed. Use `Get-PnPAccessToken` instead. |
| Remove-PnPUser | The parameter `-Confirm` has been removed. Use `-Force` instead. |
| Remove-PnPAvailableSiteClassification | The parameter `-Confirm` has been removed. Use `-Force` instead. |

## Other notable changes

- ...

## Changes to output type

| **Cmdlet** | **Comment** |
Expand Down
28 changes: 14 additions & 14 deletions documentation/Add-PnPFlowOwner.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Assigns/updates permissions to a Power Automate flow
## SYNTAX

```powershell
Add-PnPFlowOwner -Environment <PowerAutomateEnvironmentPipeBind> -Identity <PowerPlatformPipeBind> -User <String> -Role <FlowAccessRole> [-AsAdmin] [-Verbose]
Add-PnPFlowOwner [-Environment <PowerAutomateEnvironmentPipeBind>] -Identity <PowerPlatformPipeBind> -User <String> -Role <FlowAccessRole> [-AsAdmin] [-Verbose]
```

## DESCRIPTION
Expand All @@ -30,42 +30,42 @@ This cmdlet assigns/updates permissions for a user to a Power Automate flow.

### Example 1
```powershell
Add-PnPFlowOwner -Environment (Get-PnPPowerPlatformEnvironment -IsDefault) -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User [email protected] -Role CanEdit
Add-PnPFlowOwner -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User [email protected] -Role CanEdit
```
Assigns the specified user with 'CanEdit' access level to the specified flow
Assigns the specified user with 'CanEdit' access level to the specified flow in the default environment

### Example 2
```powershell
Add-PnPFlowOwner -Environment (Get-PnPPowerPlatformEnvironment -IsDefault) -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User 6844c04a-8ee7-40ad-af66-28f6e948cd04 -Role CanView
Add-PnPFlowOwner -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User 6844c04a-8ee7-40ad-af66-28f6e948cd04 -Role CanView
```
Assigns the specified user with 'CanView' access level to the specified flow
Assigns the specified user with 'CanView' access level to the specified flow in the default environment

### Example 3
```powershell
Add-PnPFlowOwner -Environment (Get-PnPPowerPlatformEnvironment -IsDefault) -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User 6844c04a-8ee7-40ad-af66-28f6e948cd04 -Role CanViewWithShare
Add-PnPFlowOwner -Environment (Get-PnPPowerPlatformEnvironment -Identity "myenvironment") -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User 6844c04a-8ee7-40ad-af66-28f6e948cd04 -Role CanViewWithShare
```
Assigns the specified user with 'CanViewWithShare' access level to the specified flow
Assigns the specified user with 'CanViewWithShare' access level to the specified flow in the specified environment

### Example 4
```powershell
Add-PnPFlowOwner -Environment (Get-PnPPowerPlatformEnvironment -IsDefault) -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User [email protected] -AsAdmin -Role CanEdit
Add-PnPFlowOwner -Environment (Get-PnPPowerPlatformEnvironment -Identity "myenvironment") -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User [email protected] -AsAdmin -Role CanEdit
```
Assigns the specified user with 'CanEdit' access level to the specified flow as admin
Assigns the specified user with 'CanEdit' access level to the specified flow as admin in the specified environment

## PARAMETERS

### -Environment
The Power Platform environment that hosts the Power Automate Flow to add the permissions to.
The name of the Power Platform environment or an Environment instance. If omitted, the default environment will be used.

```yaml
Type: PowerAutomateEnvironmentPipeBind
Type: PowerPlatformEnvironmentPipeBind
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Default value: The default environment
Accept pipeline input: True
Accept wildcard characters: False
```
Expand Down
12 changes: 12 additions & 0 deletions documentation/Add-PnPTenantRestrictedSearchAllowedList.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,29 @@ Add-PnPTenantRestrictedSearchAllowedList -SitesListFileUrl "C:\temp\sitelist.csv

Adds site URLs to the allowed list from a CSV file. The first line, which is assumed to be a header, is skipped.

Sample CSV file content with Header

SiteUrl
https://contoso.sharepoint.com/sites/Company311
https://contoso.sharepoint.com/sites/contosoportal

### EXAMPLE 2
```powershell
Add-PnPTenantRestrictedSearchAllowedList -SitesListFileUrl "C:\temp\sitelist.csv"
```

Adds site URLs to the allowed list from a CSV file.

Sample CSV file content without Header

https://contoso.sharepoint.com/sites/Company311
https://contoso.sharepoint.com/sites/contosoportal

### EXAMPLE 3
```powershell
Add-PnPTenantRestrictedSearchAllowedList -SitesList @("https://contoso.sharepoint.com/sites/Company311","https://contoso.sharepoint.com/sites/contosoportal")
```

Adds the specified sites to the allowed list.

## PARAMETERS
Expand Down
2 changes: 2 additions & 0 deletions documentation/Connect-PnPOnline.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ Accept wildcard characters: False
### -Connection
Optional connection to be reused by the new connection. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
When passed in, the ClientId/AppId used for the passed in connection will be used for the new connection. It will override any -ClientId or -AppId parameter passed in.
```yaml
Type: PnPConnection
Parameter Sets: Credentials, SharePoint ACS (Legacy) App Only, App-Only with Azure Active Directory, App-Only with Azure Active Directory using a certificate from the Windows Certificate Management Store by thumbprint, SPO Management Shell Credentials, DeviceLogin, Interactive login for Multi Factor Authentication, Environment Variable
Expand Down
24 changes: 15 additions & 9 deletions documentation/Disable-PnPFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Disables a specific flow
## SYNTAX

```powershell
Disable-PnPFlow -Environment <PowerAutomateEnvironmentPipeBind> -Identity <PowerAutomateFlowPipeBind> [-AsAdmin] [-Connection <PnPConnection>]
Disable-PnPFlow [-Environment <PowerAutomateEnvironmentPipeBind>] -Identity <PowerAutomateFlowPipeBind> [-AsAdmin] [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand All @@ -30,11 +30,17 @@ This cmdlet disables a specific flow

### Example 1
```powershell
$environment = Get-PnPFlowEnvironment
Disable-PnPFlow -Environment $environment -Identity fba63225-baf9-4d76-86a1-1b42c917a182
Disable-PnPFlow -Identity fba63225-baf9-4d76-86a1-1b42c917a182
```

Disables the specified flow.
Disables the specified flow in the default environment

### Example 2
```powershell
Disable-PnPFlow -Environment (Get-PnPPowerPlatformEnvironment -Identity "myenvironment") -Identity fba63225-baf9-4d76-86a1-1b42c917a182
```

Disables the specified flow in the specified environment

## PARAMETERS

Expand Down Expand Up @@ -70,17 +76,17 @@ Accept wildcard characters: False
```
### -Environment
The name of the environment or an Environment object to retrieve the available flows for.
The name of the Power Platform environment or an Environment instance. If omitted, the default environment will be used.
```yaml
Type: PowerAutomateEnvironmentPipeBind
Type: PowerPlatformEnvironmentPipeBind
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Default value: The default environment
Accept pipeline input: True
Accept wildcard characters: False
```
Expand Down
24 changes: 15 additions & 9 deletions documentation/Enable-PnPFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Enables a specific flow
## SYNTAX

```powershell
Enable-PnPFlow -Environment <PowerAutomateEnvironmentPipeBind> -Identity <PowerAutomateFlowPipeBind> [-AsAdmin]
Enable-PnPFlow [-Environment <PowerAutomateEnvironmentPipeBind>] -Identity <PowerAutomateFlowPipeBind> [-AsAdmin]
[-Connection <PnPConnection>]
```

Expand All @@ -31,26 +31,32 @@ This cmdlet enables a specific flow

### Example 1
```powershell
$environment = Get-PnPFlowEnvironment
Enable-PnPFlow -Environment $environment -Identity fba63225-baf9-4d76-86a1-1b42c917a182
Enable-PnPFlow -Identity fba63225-baf9-4d76-86a1-1b42c917a182
```

Enables the specified flow
Enables the specified flow in the default environment

### Example 2
```powershell
Enable-PnPFlow -Environment (Get-PnPPowerPlatformEnvironment -Identity "myenvironment") -Identity fba63225-baf9-4d76-86a1-1b42c917a182
```

Enables the specified flow in the specified environment

## PARAMETERS

### -Environment
The name of the environment or an Environment object to retrieve the available flows for.
The name of the Power Platform environment or an Environment instance. If omitted, the default environment will be used.

```yaml
Type: PowerAutomateEnvironmentPipeBind
Type: PowerPlatformEnvironmentPipeBind
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Default value: The default environment
Accept pipeline input: True
Accept wildcard characters: False
```
Expand Down
26 changes: 16 additions & 10 deletions documentation/Export-PnPFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Exports a Microsoft Power Automate Flow

### As ZIP Package
```powershell
Export-PnPFlow -Environment <PowerAutomateEnvironmentPipeBind> -Identity <PowerAutomateFlowPipeBind>
Export-PnPFlow [-Environment <PowerAutomateEnvironmentPipeBind>] -Identity <PowerAutomateFlowPipeBind>
[-AsZipPackage] [-PackageDisplayName <String>] [-PackageDescription <String>] [-PackageCreatedBy <String>]
[-PackageSourceEnvironment <String>] [-OutPath <String>] [-Force] [-Connection <PnPConnection>]
```

### As Json
```powershell
Export-PnPFlow -Environment <PowerAutomateEnvironmentPipeBind> -Identity <PowerAutomateFlowPipeBind>
Export-PnPFlow [-Environment <PowerAutomateEnvironmentPipeBind>] -Identity <PowerAutomateFlowPipeBind>
[-Connection <PnPConnection>]
```

Expand All @@ -42,14 +42,20 @@ Many times exporting a Microsoft Power Automate Flow will not be possible due to

### Example 1
```powershell
$environment = Get-PnPPowerPlatformEnvironment -IsDefault $true
Export-PnPFlow -Environment $environment -Identity fba63225-baf9-4d76-86a1-1b42c917a182
Export-PnPFlow -Environment (Get-PnPPowerPlatformEnvironment -Identity "myenvironment") -Identity fba63225-baf9-4d76-86a1-1b42c917a182
```

This will export the specified Microsoft Power Automate Flow from the default Power Platform environment as an output to the current output of PowerShell
This will export the specified Microsoft Power Automate Flow from the specified Power Platform environment as an output to the current output of PowerShell

### Example 2
```powershell
Export-PnPFlow -Environment (Get-PnPPowerPlatformEnvironment -IsDefault) -Identity fba63225-baf9-4d76-86a1-1b42c917a182
```

This will export the specified Microsoft Power Automate Flow from the default Power Platform environment as an output to the current output of PowerShell

### Example 3
```powershell
Get-PnPPowerPlatformEnvironment | foreach { Get-PnPFlow -Environment $_.Name } | foreach { Export-PnPFlow -Environment $_.Properties.EnvironmentDetails.Name -Identity $_ -OutPath "c:\flows\$($_.Name).zip" -AsZipPackage }
```

Expand Down Expand Up @@ -89,17 +95,17 @@ Accept wildcard characters: False
```
### -Environment
The environment which contains the flow.
The name of the Power Platform environment or an Environment instance. If omitted, the default environment will be used.
```yaml
Type: PowerAutomateEnvironmentPipeBind
Type: PowerPlatformEnvironmentPipeBind
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Default value: The default environment
Accept pipeline input: True
Accept wildcard characters: False
```
Expand Down
18 changes: 8 additions & 10 deletions documentation/Export-PnPPowerApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Exports a Microsoft Power App
## SYNTAX

```
Export-PnPPowerApp -Environment <PowerPlatformEnvironmentPipeBind> -Identity <PowerAppPipeBind>
Export-PnPPowerApp [-Environment <PowerPlatformEnvironmentPipeBind>] -Identity <PowerAppPipeBind>
[-PackageDisplayName <String>] [-PackageDescription <String>] [-PackageCreatedBy <String>]
[-PackageSourceEnvironment <String>] [-OutPath <String>] [-Force] [-Connection <PnPConnection>]
[<CommonParameters>]
Expand All @@ -35,18 +35,16 @@ Many times exporting a Microsoft Power App will not be possible due to various r

### Example 1
```powershell
$environment = Get-PnPPowerPlatformEnvironment -IsDefault $true
Export-PnPPowerApp -Environment $environment -Identity fba63225-baf9-4d76-86a1-1b42c917a182 -OutPath "C:\Users\user1\Downloads\test_20230408152624.zip"
Export-PnPPowerApp -Identity fba63225-baf9-4d76-86a1-1b42c917a182 -OutPath "C:\Users\user1\Downloads\test_20230408152624.zip"
```

This will export the specified Microsoft Power App from the default Power Platform environment as an output to the path specified in the command as -OutPath

### Example 2
```powershell
$environment = Get-PnPPowerPlatformEnvironment -IsDefault $true
Export-PnPPowerApp -Environment $environment -Identity fba63225-baf9-4d76-86a1-1b42c917a182 -OutPath "C:\Users\user1\Downloads\test_20230408152624.zip" -PackageDisplayName "MyAppDisplayName" -PackageDescription "Package exported using PnP Powershell" -PackageCreatedBy "Siddharth Vaghasia" -PackageSourceEnvironment "UAT Environment"
Export-PnPPowerApp -Environment (Get-PnPPowerPlatformEnvironment -Identity "myenvironment") -Identity fba63225-baf9-4d76-86a1-1b42c917a182 -OutPath "C:\Users\user1\Downloads\test_20230408152624.zip" -PackageDisplayName "MyAppDisplayName" -PackageDescription "Package exported using PnP Powershell" -PackageCreatedBy "Siddharth Vaghasia" -PackageSourceEnvironment "UAT Environment"
```
This will export the specified Microsoft Power App from the default Power Platform environment with metadata specified
This will export the specified Microsoft Power App from the specified Power Platform environment with metadata specified

### Example 3
```powershell
Expand Down Expand Up @@ -74,17 +72,17 @@ Accept wildcard characters: False
```
### -Environment
The environment which contains the App.
The name of the Power Platform environment or an Environment instance. If omitted, the default environment will be used.
```yaml
Type: PowerPlatformEnvironmentPipeBind
Parameter Sets: (All)
Aliases:

Required: True
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Default value: The default environment
Accept pipeline input: True
Accept wildcard characters: False
```
Expand Down
Loading

0 comments on commit 9e6d356

Please sign in to comment.