Skip to content

Commit

Permalink
Merge branch 'dev' into Get-PnPFileFolderInFolderRename
Browse files Browse the repository at this point in the history
  • Loading branch information
gautamdsheth authored Nov 10, 2023
2 parents 4fee800 + 375c404 commit d598c8d
Show file tree
Hide file tree
Showing 190 changed files with 6,590 additions and 4,882 deletions.
34 changes: 34 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "PnP PowerShell",
"image": "mcr.microsoft.com/devcontainers/dotnet:0-6.0",
"features": {
"ghcr.io/devcontainers/features/git:1": {
"ppa": true,
"version": "os-provided"
},
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
}
},
"workspaceFolder": "/workspaces/powershell",
"postCreateCommand": "bash ./build/postCreateCommand.sh",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.defaultProfile.linux": "pwsh"
},
"extensions": [
"ms-vscode.powershell",
"ms-dotnettools.csdevkit",
"ms-vsliveshare.vsliveshare",
"shd101wyy.markdown-preview-enhanced",
"GitHub.copilot",
"GitHub.copilot-chat",
"eamodio.gitlens",
"github.vscode-pull-request-github"
]
}
},
"remoteUser": "root",
"shutdownAction": "stopCompose"
}
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,25 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `Get-PnPFlowOwner` cmdlet which allows retrieving the owners of a Power Automate flow [#3314](https://github.com/pnp/powershell/pull/3314)
- Added `-AvailableForTagging` to `Set-PnPTerm` which allows the available for tagging property on a Term to be set [#3321](https://github.com/pnp/powershell/pull/3321)
- Added `Get-PnPPowerPlatformConnector` cmdlet which allows for all custom connectors to be retrieved [#3309](https://github.com/pnp/powershell/pull/3309)
- Added `Set-PnPSearchExternalItem` cmdlet which allows ingesting external items into the Microsoft Search index for custom connectors. [#3420](https://github.com/pnp/powershell/pull/3420)
- Added `Get-PnPTenantInfo` which allows retrieving tenant information by its Id or domain name [#3414](https://github.com/pnp/powershell/pull/3414)
- Added option to create a Microsoft 365 Group with dynamic membership by passing in `-DynamicMembershipRule` [#3426](https://github.com/pnp/powershell/pull/3426)
- Added option to pass in a Stream or XML string to `Read-PnPTenantTemplate` allowing the tenant template to be modified before being applied. [#3431](https://github.com/pnp/powershell/pull/3431)
- Added `Get-PnPTenantInfo` which allows retrieving tenant information by its Id or domain name. [#3414](https://github.com/pnp/powershell/pull/3414)
- Added option to create a Microsoft 365 Group with dynamic membership by passing in `-DynamicMembershipRule` [#3426](https://github.com/pnp/powershell/pull/3426)
- Added `Get-PnPSiteVersionPolicy` which allows retrieval of the version policy settings for a site [#3470](https://github.com/pnp/powershell/pull/3470)
- Added `RestrictedAccessControl`, `ClearRestrictedAccessControl`, `RemoveRestrictedAccessControlGroups`, `AddRestrictedAccessControlGroups` and `RestrictedAccessControlGroups` parameters to `Set-PnPTenantSite` cmdlet to handle restricted access control. [#3463](https://github.com/pnp/powershell/pull/3463)
- Added `Get-PnPRetentionLabel` cmdlet to retrieve Purview retention labels. [#3459](https://github.com/pnp/powershell/pull/3459)
- Added GCC support for `Get-PnPAzureADUser` , `Add-PnPFlowOwner` , `Remove-PnPFlowOwner`, `Sync-PnPSharePointUserProfilesFromAzureActiveDirectory`, `New-PnPAzureADUserTemporaryAccessPass` and `Get-PnPAvailableSensitivityLabel` cmdlets. [#3484](https://github.com/pnp/powershell/pull/3484)
- Added a devcontainer for easily building a minimal environment necessary to contribute to the project. [#3497](https://github.com/pnp/powershell/pull/3497)
- Added `-RelativeUrl` parameter to `Connect-PnPOnline` cmdlet to allow specifying custom URLs for usage with `-WebLogin` method. [#3530](https://github.com/pnp/powershell/pull/3530)
- Added `-RetryCount` to `Submit-PnPSearchQuery` which allows for specifying the number of retries to perform when an exception occurs [#3528](https://github.com/pnp/powershell/pull/3528)
- Added `-MailNickname` parameter to `Set-PnPMicrosoft365Group` cmdlet to allow changing of this property on a Microsoft 365 Group [#3529](https://github.com/pnp/powershell/pull/3529)
- Added `-SanNames` to `New-PnPAzureCertificate` which allows for controlling the Subject Alternative Names set on the generated certificate [#3555](https://github.com/pnp/powershell/pull/3555)
- Added Information Barriers information to the output of `Get-PnPTenantSite` [#3556](https://github.com/pnp/powershell/pull/3556)
- Added `RequestFilesLinkEnabled` and `RequestFilesLinkExpirationInDays` to the output of `Get-PnPSite` [#3557](https://github.com/pnp/powershell/pull/3557)
- Added `CoreRequestFilesLinkEnabled`, `CoreRequestFilesLinkExpirationInDays`, `OneDriveRequestFilesLinkEnabled`, `OneDriveRequestFilesLinkExpirationInDays`, `BusinessConnectivityServiceDisabled` to the output of `Get-PnPTenant` [#3557](https://github.com/pnp/powershell/pull/3557)
- Added `-BusinessConnectivityServiceDisabled` parameter to `Set-PnPTenant` cmdlt to allow disabling the Business Connectivity Service [#3562](https://github.com/pnp/powershell/pull/3562)

### Fixed

Expand All @@ -52,6 +68,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed `New-PnPTeamsTeam` cmdlet not working well with a managed identity [#3351](https://github.com/pnp/powershell/pull/3351)
- Fixed `Copy-PnPFile`, `Copy-PnPFolder` and `Move-PnPFile` to better handle copying or moving operations to OneDrive or Multi-geo environments. [#3245](https://github.com/pnp/powershell/pull/3245)
- Fixed `Get-PnPTenantTemplate` not doing anything when the `-SiteUrl` parameter had not been specified. It will now use the currently connected site when the parameter is omitted. [#3431](https://github.com/pnp/powershell/pull/3431)
- Fixed `Enable-PnPPageScheduling` and `Disable-PnPPageScheduling` cmdlets not working due to changes in backend code. [#3469](https://github.com/pnp/powershell/pull/3469)
- Fixed an issue when trying to download a file using `Get-PnPFile` from a location that's deeply nested into folders and/or has a really long filename [PnP Core #1290](https://github.com/pnp/pnpcore/pull/1290)
- Fixed retrieving error detail in `Get-UPABulkImportStatus` cmdlet. [#3494](https://github.com/pnp/powershell/pull/3494)
- Fixed `Rename-PnPTenantSite` cmdlet to allow support for vanity tenant URLs. [#3533](https://github.com/pnp/powershell/pull/3533)

### Changed

Expand All @@ -60,13 +80,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Verbose output will no longer show the access token [#3352](https://github.com/pnp/powershell/pull/3352)
- Improved `Add-PnPFile` cmdlet. It will now automatically checkout the file if `-CheckinType` parameter is specified. [#3403](https://github.com/pnp/powershell/pull/3403)
- Improved the error message thrown when using `-ValidateConnection` with `Connect-PnPOnline` and it failing due to i.e. an expired ClientSecret so the reason of the failed connect becomes more clear. [#3440](https://github.com/pnp/powershell/pull/3440)
- If a cmdlet gets renamed and an alias gets added for it for backwards compatibility, a cmdlet page for the alias will automatically be created so it can still be found in the documentation [#3455](https://github.com/pnp/powershell/pull/3455)
- Changed `Get-PnPContentType` to now also support `-Includes` to allow retrieval of additional properties of the content type [#3518](https://github.com/pnp/powershell/pull/3518)
- `Get-PnPTeamsTeam` cmdlet throws error message if the team isn't found when `-Identity` parameter is specified. [#3502](https://github.com/pnp/powershell/pull/3502)
- Improved `Get-PnPSiteCollectionAdmin ` cmdlet to allow retrieval of additional properties when `-Includes` parameter is specified. [#3521](https://github.com/pnp/powershell/pull/3521)

### Removed

- Removed `-DisableListSync` and `-SyncAadB2BManagementPolicy` from `Set-PnPTenant` as the underlying properties have been removed from SharePoint CSOM as well [#3388](https://github.com/pnp/powershell/pull/3388)

### Contributors

- Antti K. Koskela [koskila]
- Christian Veenhuis [ChVeen]
- Kunj Balkrishna Sangani [kunj-sangani]
- Antti K. Koskela [koskila]
- Dave Paylor [paylord]
- [smsdaniel]
- Jim Duncan [sparkitect]
- Jonathan Smith [jonathan-m-smith]
Expand Down Expand Up @@ -716,7 +745,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Added `Get\Set-PnPPlannerConfiguration` to allow working with the Microsoft Planner tenant configuration
- Added `Get\Set-PnPPlannerUserPolicy` to allow setting Microsoft Planner user policies for specific users
- Added `Get\Add\Remove-PnPPlannerRoster` which allows a Microsoft Planner Roster to be created, retrieved or removed
- Added `Get\Add\Remove-PnPPlannerRosterMember` to be able to read, add and remove members from a Microsft Planner Roster
- Added `Get\Add\Remove-PnPPlannerRosterMember` to be able to read, add and remove members from a Microsoft Planner Roster
- Added `Get-PnPPlannerRosterPlan` to be able to retrieve the Microsoft Planner plans inside a Microsoft Planner Roster or the ones belonging to a specific user
- Added support for off peak SharePoint Syntex content classification and extraction for lists and folders via new `-OffPeak` and `-Folder` parameters for `Request-PnPSyntexClassifyAndExtract`
- Added `Invoke-PnPSiteScript` which allows for a Site Script to be executed on a site without needing to have it registered in a site design or site script first
Expand Down
39 changes: 0 additions & 39 deletions build/Build-HelpFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,6 @@ if($IsLinux -or $isMacOS)
$destinationFolder = "$documentsFolder/PowerShell/Modules/PnP.PowerShell"
}

Try {
Write-Host "Generating documentation files for alias cmdlets" -ForegroundColor Yellow
# Load the Module in a new PowerShell session
$scriptBlock = {
$documentsFolder = [environment]::getfolderpath("mydocuments")
if($IsLinux -or $isMacOS)
{
$destinationFolder = "$documentsFolder/.local/share/powershell/Modules/PnP.PowerShell"
} else {
$destinationFolder = "$documentsFolder/PowerShell/Modules/PnP.PowerShell"
}
$pnpDllLocation = "$destinationFolder/Core/PnP.PowerShell.dll"

Write-Host "Importing PnP PowerShell assembly from $pnpDllLocation"
Import-Module -Name $pnpDllLocation -DisableNameChecking -Force
Write-Host "Import PnP PowerShell successful"
$cmdlets = Get-Command -Module PnP.PowerShell | Where-Object CommandType -eq "Alias" | Select-Object -Property @{N="Alias";E={$_.Name}}, @{N="ReferencedCommand";E={$_.ReferencedCommand.Name}}
$cmdlets
Write-Host "Retrieved alias cmdlets successfully"
}
$aliasCmdlets = Start-ThreadJob -ScriptBlock $scriptBlock | Receive-Job -Wait

Write-Host " - $($aliasCmdlets.Length) found" -ForegroundColor Yellow

$aliasTemplatePageContent = Get-Content -Path "../pages/cmdlets/alias.md" -Raw

ForEach($aliasCmdlet in $aliasCmdlets)
{
$destinationFileName = "./../documentation/$($aliasCmdlet.Alias).md"

Write-Host " - Creating page for $($aliasCmdlet.Alias) being an alias for $($aliasCmdlet.ReferencedCommand) as $destinationFileName" -ForegroundColor Yellow
$aliasTemplatePageContent.Replace("%%cmdletname%%", $aliasCmdlet.Alias).Replace("%%referencedcmdletname%%", $aliasCmdlet.ReferencedCommand) | Out-File $destinationFileName -Force
}
}
Catch {
Write-Host "Error: Cannot generate alias documentation files"
Write-Host $_
}

$tempFolder = [System.IO.Path]::GetTempPath()

$runsInAction = $("$env:RUNSINACTION")
Expand Down
5 changes: 5 additions & 0 deletions build/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Build the project
/usr/bin/pwsh -c '/workspaces/powershell/build/Build-Debug.ps1'

# Install optional modules
/usr/bin/pwsh -c 'Install-Module Microsoft.PowerShell.SecretStore,Microsoft.Powershell.SecretManagement -Force'
19 changes: 2 additions & 17 deletions documentation/Add-PnPField.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Add a field
```powershell
Add-PnPField [-List <ListPipeBind>] -DisplayName <String> -InternalName <String> -Type <FieldType>
[-Id <Guid>] [-Formula <String>] [-Choices <String>] [-AddToDefaultView] [-Required] [-Group <String>] [-ClientSideComponentId <Guid>]
[-ClientSideComponentProperties <String>] [-AddToAllContentTypes] [-ReturnType <String>] [-Connection <PnPConnection>]
[-ClientSideComponentProperties <String>] [-AddToAllContentTypes] [-Connection <PnPConnection>]
```

### Add field reference to list
Expand All @@ -30,7 +30,7 @@ Add-PnPField -List <ListPipeBind> -Field <FieldPipeBind> [-Connection <PnPConnec
### Add field to web
```powershell
Add-PnPField -DisplayName <String> -InternalName <String> -Type <FieldType> [-Id <Guid>] [-Formula <String>] [-Choices <String>]
[-ClientSideComponentId <Guid>] [-ClientSideComponentProperties <String>] [-ReturnType <String>]
[-ClientSideComponentId <Guid>] [-ClientSideComponentProperties <String>]
[-Connection <PnPConnection>]
```

Expand Down Expand Up @@ -304,21 +304,6 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -ReturnType
The return type of the calculated field. Only valid when Type Calculated is chosen.
```yaml
Type: FieldType
Parameter Sets: Add field to list, Add field to web
Accepted values: Integer, Text, DateTime, Boolean, Number, Currency

Required: False
Position: Named
Default value: Text
Accept pipeline input: False
Accept wildcard characters: False
```
## RELATED LINKS
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
15 changes: 15 additions & 0 deletions documentation/Connect-PnPOnline.md
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -RelativeUrl
The site-relative URL of the site you're collecting to. Only applies if you're using -UseWebLogin.

```yaml
Type: String
Parameter Sets: Web Login for Multi Factor Authentication
Aliases:
Required: False
Position: Named
Default value: /_layouts/15/settings.aspx
Accept pipeline input: False
Accept wildcard characters: False
```

### -Interactive
Connects to the Azure AD using interactive login, allowing you to authenticate using multi-factor authentication.
This parameter has preference over \`-UseWebLogin\`.
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

## 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.html) 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 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.

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
2 changes: 1 addition & 1 deletion documentation/Get-PnPAvailableSensitivityLabel.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Get-PnPAvailableSensitivityLabel [-Identity <Guid>] [-User <AzureADUserPipeBind>
## DESCRIPTION
This cmdlet allows retrieval of the available Microsoft Purview sensitivity labels in the currently connected tenant. You can retrieve all the labels, a specific label or all the labels available to a specific user. When connected with a delegate token, it will return the Microsoft Purview sensitivity labels for the user you logged on with. When connecting with an application token, it will return all available Microsoft Purview sensitivity labels on the tenant.

For retrieval of the available classic Site Classification, use [Get-PnPAvailableSiteClassification](Get-PnPAvailableSiteClassification.html) instead.
For retrieval of the available classic Site Classification, use [Get-PnPAvailableSiteClassification](Get-PnPAvailableSiteClassification.md) instead.

## EXAMPLES

Expand Down
2 changes: 1 addition & 1 deletion documentation/Get-PnPAvailableSiteClassification.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Get-PnPAvailableSiteClassification [-Connection <PnPConnection>]
```

## DESCRIPTION
This cmdlet allows for retrieving the configuration of the classic site classifications configured within the tenant. For the new Microsoft Purview sensitivity labels, use [Get-PnPAvailableSensitivityLabel](Get-PnPAvailableSensitivityLabel.html) instead.
This cmdlet allows for retrieving the configuration of the classic site classifications configured within the tenant. For the new Microsoft Purview sensitivity labels, use [Get-PnPAvailableSensitivityLabel](Get-PnPAvailableSensitivityLabel.md) instead.

## EXAMPLES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Get-PnPAzureADServicePrincipalAvailableAppRole -Principal <ServicePrincipalPipeB

## DESCRIPTION

Allows retrieval of all available app roles of a specific service principals/app registration in Azure Active Directory. To retrieve the app roles currently assigned to a specific service principal/application registration, use [Get-PnPAzureADServicePrincipalAssignedAppRole](Get-PnPAzureADServicePrincipalAssignedAppRole.html) instead.
Allows retrieval of all available app roles of a specific service principals/app registration in Azure Active Directory. To retrieve the app roles currently assigned to a specific service principal/application registration, use [Get-PnPAzureADServicePrincipalAssignedAppRole](Get-PnPAzureADServicePrincipalAssignedAppRole.md) instead.

## EXAMPLES

Expand Down
4 changes: 3 additions & 1 deletion documentation/Get-PnPAzureADUser.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ Retrieves the 10th through the 20th user from Azure Active Directory. Notice tha
### -Delta
Retrieves all users and provides a SkipToken delta token to allow to query for changes since this run when querying again by adding -DeltaToken to the command.

Note that using -Select and -Filter in combination with this parameter is limited. More information on this can be found [here](https://learn.microsoft.com/graph/api/user-delta?view=graph-rest-1.0&tabs=http#odata-query-parameters).

```yaml
Type: SwitchParameter
Parameter Sets: Return the delta
Expand Down Expand Up @@ -240,4 +242,4 @@ Accept wildcard characters: False
## RELATED LINKS
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
2 changes: 1 addition & 1 deletion documentation/Get-PnPBrowserIdleSignout.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Get-PnPBrowserIdleSignout
```

## DESCRIPTION
Use this cmdlet to retrieve the current configuration values for Idle session sign-out policy, the time at which users are warned and subsequently signed out of Microsft 365 after a period of browser inactivity in SharePoint and OneDrive.
Use this cmdlet to retrieve the current configuration values for Idle session sign-out policy, the time at which users are warned and subsequently signed out of Microsoft 365 after a period of browser inactivity in SharePoint and OneDrive.

## EXAMPLES

Expand Down
Loading

0 comments on commit d598c8d

Please sign in to comment.