Giter VIP home page Giter VIP logo

powershell's Introduction

PnP PowerShell

PnP PowerShell is a .NET 6 based PowerShell Module providing over 650 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more.

Last version Last nightly version
PnP.PowerShell PnP.PowerShell

OpenSSF Scorecard

This module is a successor of the PnP-PowerShell module. The original cmdlets only work on Windows and Windows PowerShell and supports SharePoint On-Premises (2013, 2016 and 2019) and SharePoint Online. This version of the cmdlets is cross-platform (i.e it works on Windows, MacOS and Linux) but it will only support SharePoint Online. Going forward we will only be actively maintaining the cross-platform PnP PowerShell module.

For more information about installing or upgrading to this module, please refer to the documentation.

IMPORTANT - New PnP PowerShell 2.x

As the technologies behind PowerShell evolve, so will the PnP PowerShell module. Microsoft is no longer supporting .NET 3.1 since December 2022, and .NET Framework is not actively being developed anymore. It is also not cross platform. PnP PowerShell 2.x will therefore no longer support PowerShell 5.1 nor the ISE. 

We have created a guide for upgrading from previous versions to PnP PowerShell 2.x. If you are still using PowerShell 5.1 or the ISE, and want to use the latest major or nightly release, you will need to specify the required version like below: 

Install-Module PnP.PowerShell -RequiredVersion 1.12.0 -Force

Both (1.x and 2.x) can be installed in the same machine with no conflict.

Supportability and SLA

This library is open-source and community provided library with active community providing support for it. This is not Microsoft provided module so there's no SLA or direct support for this open-source component from Microsoft. For more information about the PnP initiative, check out the official website: Microsoft 365 & Power Platform Community.


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

powershell's People

Contributors

andy-dawson avatar erwinvanhunen avatar fowl2 avatar ganesh-sanap avatar gautamdsheth avatar jackpoz avatar jansenbe avatar koenzomers avatar koskila avatar leonarmston avatar markus-hanisch avatar martinlingstuyl avatar milanholemans avatar msjennywu avatar nishkalankbezawada avatar paolopia avatar powershellscripts avatar reshmee011 avatar reusto avatar sguitardude avatar shurick81 avatar siddharth-vaghasia avatar swapnil1993 avatar sympmarc avatar toddklindt avatar veronicageek avatar vesajuvonen avatar wilecoyotegenius avatar wobba avatar yuriysamorodov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powershell's Issues

[FEATURE] connect-pnponline via proxy

Is your feature request related to a problem? Please describe.

I am unable to connect to SharePoint Online via a proxy. I want to connect to SPO from a script with using the "Connect-PnPOnline $SiteURL -Credentials $cred" command. There is a proxy set in IE which I want to use when connecting. The only possible way to connect is by using the "-UseWebLogin" option but that only works interactively and I want to run this script from a scheduled task.

Describe the solution you'd like

Allow to set a proxy when connecting via the "-credentials" option. For example: Connect-PnPOnline $SiteURL -Credentials $cred -proxy myproxy (or use settings from IE).

Describe alternatives you've considered

I searched the Internet and not found a working solution for this. Connecting only works with the "-UseWebLogin" option but it does'nt work when a script is running from a scheduled task.

[Question] Connect-PnPOnline only works with PnPManagementShell?

Will this version of PnP-PowerShell only work with the PnPManagementShell? Or own custom App registration?
For my organization tenants I am not allowed to add the PnPManagementShell permissions to my account in Azure AD.
So we just want to use an account that is SharePoint administrator.

[BUG] Set-PnPDefaultColumnValues not applying (termset) when in Azure function after an provisioning list apply

Reporting an Issue or Missing Feature

Set-PnPDefaultColumnValues not applying (termset) when in Azure function after an provisioning list apply. The same script works in Azure Function runtime ~1 using PNP v3
This might be related to #42

Yellow is via Set-PnPDefaultColumnValues
Green is manually ivia interface
image

Expected behavior

After Set-PnPDefaultColumnValues new items have the default value specified

Actual behavior

No Default value

Steps to reproduce behavior

Apply template then run
Set-PnPDefaultColumnValues -List "Shared Documents" -Field "theField" -Value "SomeGUID"

What is the version of the Cmdlet module you are running?

Latest

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • [ X] Azure Functions
  • Other : please specify

Looping commands causes "client request loop" error

Reporting an Issue or Missing Feature

I am running a script that connects to a hub site, extracts the footer template and then applies that footer template to all the associated spoke sites for that hub site. The script runs fine without any errors and applies the footer template to the first "N" sites but then starts returning a "client request loop" error for the remainder of the sites. The error is being thrown on the Connect-PnPOnline (Line 68) command. My assumption is that the server is seeing the same commands executed over and over and assumes it is an infinite loops so it terminates the command. Not sure if you have any control over this but I wanted to report it and see if there is a fix or workaround.

Expected behavior

Script runs through without any errors no matter how many times I loop through the commands.

Actual behavior

Script starts throwing an error after some number of sites. Number of sites seems to be different each time.

MSAL.NetCore.4.21.0.0.MsalUiRequiredException: 
	ErrorCode: invalid_grant
Microsoft.Identity.Client.MsalUiRequiredException: AADSTS50196: The server terminated an operation because it encountered a client request loop. Please contact your app vendor.
Trace ID: 03263d4e-a8b5-42e7-bd28-6478d8904d00
Correlation ID: 2b1c1f55-dd4e-42da-96dd-8f1fc8b3f83e
Timestamp: 2021-01-04 20:31:36Z
   at PnP.PowerShell.Commands.Base.ConnectOnline.ProcessRecord() in D:\a\powershell\powershell\src\Commands\Base\ConnectOnline.cs:line 293
   at System.Management.Automation.CommandProcessor.ProcessRecord()
	StatusCode: 400 
	ResponseBody: {"error":"invalid_grant","error_description":"AADSTS50196: The server terminated an operation because it encountered a client request loop. Please contact your app vendor.\r\nTrace ID: 03263d4e-a8b5-42e7-bd28-6478d8904d00\r\nCorrelation ID: 2b1c1f55-dd4e-42da-96dd-8f1fc8b3f83e\r\nTimestamp: 2021-01-04 20:31:36Z","error_codes":[50196],"timestamp":"2021-01-04 20:31:36Z","trace_id":"03263d4e-a8b5-42e7-bd28-6478d8904d00","correlation_id":"2b1c1f55-dd4e-42da-96dd-8f1fc8b3f83e","error_uri":"https://login.microsoftonline.com/error?code=50196"} 
	Headers: Cache-Control: no-store, no-cache
Pragma: no-cache
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
P3P: CP="DSP CUR OTPi IND OTRi ONL FIN"
client-request-id: 2b1c1f55-dd4e-42da-96dd-8f1fc8b3f83e
x-ms-request-id: 03263d4e-a8b5-42e7-bd28-6478d8904d00
x-ms-ests-server: 2.1.11328.14 - EUS ProdSlices
x-ms-clitelem: 1,50196,0,,
Set-Cookie: fpc=AnmSYBLQZ0pAgWcAHpjKSLg-FWqNFAAAADJxhdcOAAAA; expires=Wed, 03-Feb-2021 20:31:36 GMT; path=/; secure; HttpOnly; SameSite=None, x-ms-gateway-slice=estsfd; path=/; secure; httponly, stsservicecookie=estsfd; path=/; secure; samesite=none; httponly
Date: Mon, 04 Jan 2021 20:31:35 GMT

Steps to reproduce behavior

$hubsite = Read-Host "Please enter the Hub site Url"
$global:creds = Get-Credential
$footerLogoUrl = $hubsite+"/SiteAssets/logo.png"

# Declaring and creating the log files. Each time the script is executed, a new file will be created with the current time in the filename.
$dateTime=Get-Date -format "dd-MMM-yyyy HH-mm-ss"
$ExecutionLogFile="UpdateFooter_Report"+"_"+ $dateTime + ".csv"
$ExecutionExceptionFile="UpdateFooter_Exceptions"+"_"+ $dateTime + ".log"
$Header="SiteName,Url"
Add-Content -Path $ExecutionLogFile -Value $Header

#Process hub site
$spokeSites = "spokesites.csv"
if (Test-Path $spokeSites -PathType leaf) {
	Clear-Content $spokeSites
}
$Header="SiteName,Url"
Add-Content -Path $spokeSites -Value $Header
Write-Host "Processing Hub site..."
try {
	Connect-PnPOnline -Url $hubsite -Credentials ($global:creds)
	$results = Submit-PnPSearchQuery -Query 'contentclass=sts_site' -RefinementFilters 'departmentid:string("{*",linguistics=off)' -TrimDuplicates $false -SelectProperties @("Title","Path","DepartmentId","SiteId") -All -RelevantResults
	$hubSites = $results |? { $_.DepartmentId.Trim('{','}') -eq $_.SiteId  }
	foreach( $hub in $hubSites ) {
		if ($hub.Path.TrimEnd("/") -eq $hubsite) {
			Write-Host "Getting footer from "$hub.Title"..." -NoNewLine
			Connect-PnPOnline -Url $hubsite -Credentials ($global:creds)
			Get-PnPSiteTemplate -Out .\hubfootertemplate.xml -Force -Handlers SiteFooter
			$footerparams = Get-PnPFooter
			$footerLogoPath = $hubsite+$footerparams.LogoUrl
			$footerLayout = $footerparams.Layout
			$footerBackgroundTheme = $footerparams.BackgroundTheme
			$footerTitle = $footerparams.Title
			((Get-Content -path .\hubfootertemplate.xml -Raw) -replace 'RemoveExistingNodes="false"','RemoveExistingNodes="true"') | Set-Content -Path .\hubfootertemplate.xml
			$newLogoPath = 'Logo="'+$footerLogoPath+'"'
			((Get-Content -path .\hubfootertemplate.xml -Raw) -replace 'Logo="/"',$newLogoPath) | Set-Content -Path .\hubfootertemplate.xml
			Write-Host "done." -ForegroundColor Green

			Write-Host "Getting Spoke sites for: "$hub.Title - $hubsite"..." -NoNewLine
			# Filter to sites associated to the current hub
			$associatedSites = ($results |? { $_.DepartmentId -eq $hub.DepartmentId -and $_.SiteId -ne $hub.SiteId })
			foreach($site in $associatedSites) {
				$title = (($site.Title) -replace ",","_")
				$spokesite = $title+","+ $site.Path
				Add-Content -Path $spokeSites -Value $spokesite
			}
			Write-Host "done." -ForegroundColor Green
		}
		else {
			Write-Host "Skipping Hub site: " $hub.Title " - " $hub.Path
		}
	}
}
catch [Exception] {
	Write-Host "Error." -ForegroundColor Red
	Add-Content -Path $ExecutionExceptionFile -Value $Url
	Add-Content -Path $ExecutionExceptionFile -Value "Exception processing hub site."
	Add-Content -Path $ExecutionExceptionFile -Value $_.exception
	Add-Content -Path $ExecutionExceptionFile -Value "======================================="
	Write-Host "Exiting...process incomplete!" -ForegroundColor Red
	exit	
}
#Apply footer template to spoke sites
$sitelist = Import-Csv $spokeSites
foreach ($site in $sitelist) {
	Write-Host "Updating $($site.Sitename)." -NoNewLine
	try {
		Connect-PnPOnline -Url $site.Url -Credentials ($global:creds)
		Write-Host "." -NoNewLine
		#Setting these parameters separately because was having issues when all in one command line
		Set-PnPFooter -Enabled:$true -Title $footerTitle 
		Write-Host "." -NoNewLine
		Set-PnPFooter -Layout $footerLayout
		Write-Host "." -NoNewLine
		Set-PnPFooter -BackgroundTheme $footerBackgroundTheme
		Write-Host "." -NoNewLine
		Set-PnPFooter -LogoUrl $footerLogoPath
		Write-Host "." -NoNewLine
		Invoke-PnPSiteTemplate -Path hubfootertemplate.xml
		Write-Host "." -NoNewLine
        Set-PnPWeb -SiteLogoUrl $footerLogoUrl
        Write-Host "." -NoNewLine
		$value = $site.SiteName+","+$site.Url
		Add-Content -Path $ExecutionLogFile -Value $value
		Write-Host "done." -ForegroundColor Green
	}
        catch [Exception]
        {
		Write-Host "Error." -ForegroundColor Red
                Add-Content -Path $ExecutionExceptionFile -Value $site.Url
                Add-Content -Path $ExecutionExceptionFile -Value "Exception updating the site footer"
                Add-Content -Path $ExecutionExceptionFile -Value $_.exception
                Add-Content -Path $ExecutionExceptionFile -Value "======================================="
        }
}

What is the version of the Cmdlet module you are running?

0.3.25
PS 7.0.3

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

[BUG] - connect-pnponline with -accessToken and -url, doesn't create context(current connection holds no SharePoint context)

Reporting an Issue

I am trying to run the command Connect-PnPOnline -Url $siteUrl -AccessToken $accessToken in Powershell and function App both with a valid access token but when I call any SharePoint pnp command after the connection I keep getting the Issue: The current connection holds no SharePoint context. Please use one of the Connect-PnPOnline commands which uses the -Url argument to connect.

Expected behavior

As the command Connect-PnPOnline is called with valid URl and accesstoken I should be able to call any Get-PnP* commands for the site successfully.

Actual behavior

Any sharepoint PnP commands for the site (Url used in the Connect-PnPOnline ) fails with the Issue The current connection holds no SharePoint context. Please use one of the Connect-PnPOnline commands which uses the -Url argument to connect.

Steps to reproduce behavior

  1. Getting the AccessToken in the function app using the code below :
    $ClientApplicationBuilder = [Microsoft.Identity.Client.PublicClientApplicationBuilder]::Create($clientId)
    [void]$ClientApplicationBuilder.WithAuthority($authority)
    [void]$ClientApplicationBuilder.WithRedirectUri($redirectUri)
    $appBuilder = $ClientApplicationBuilder.Build()

     [Microsoft.Identity.Client.AuthenticationResult] $authenticationResult  = $null
     $SecurePassword = $(ConvertTo-Securestring $Password -asplaintext -force)
     $AquireTokenParameters = $appBuilder.AcquireTokenByUsernamePassword($scopes, $username, $securePassword)
     $authenticationResult = $AquireTokenParameters.ExecuteAsync().GetAwaiter().GetResult()
     $accessToken = $authenticationResult.AccessToken
    

2.Executing Connect-PnPOnline -Url $siteUrl -AccessToken $accessToken and then calling any Get-PnP* command for the site
like $site = Get-PnPSite -Includes RootWeb

What is the version of the Cmdlet module you are running?

I have tried with versions 0.1.25, 0.1.30 and latest one 0.2.2 but getting the same Issue.
Connect-PnPOnline_Issue

Access denied using New-PnPTerm

I am getting access denied using New-PnPTerm. Consent have been given, I have GA, I am termstore and termgroup admin. Is this a problem in v4 or an issue in my tenant?

image

"Install-Module PnP.PowerShell" does not working and get an error.

Notice

PS C:\Windows\System32> Install-Module PnP.PowerShell
Install-Package: C:\powershell-7.1.0-win-x64\Modules\PowerShellGet\PSModule.psm1:9711
Line |
9711 |  … talledPackages = PackageManagement\Install-Package @PSBoundParameters
     |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | No match was found for the specified search criteria and module name 'PnP.PowerShell'. Try
     | Get-PSRepository to see all available registered module repositories.

Reporting an Issue or Missing Feature

Reporting Issue

Expected behavior

Want to install module PnP.PowerShell

Actual behavior

Getting an error like the one above.

Steps to reproduce behavior

Just Install-Module PnP.PowerShell

What is the version of the Cmdlet module you are running?

PS C:\Windows\System32> Get-Module -Name sharepointpnppowershell* -ListAvailable

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Binary     3.26.2010…            SharePointPnPPowerShellOnline       Desk      {Add-PnPAlert, Add-PnPApp, Add-PnPAppli…
Binary     3.25.2009…            SharePointPnPPowerShellOnline       Desk      {Add-PnPAlert, Add-PnPApp, Add-PnPAppli…

[BUG] Set-PnPWebPermission: The parameter "Identity" is declared in parameter-set "__AllParameterSets" multiple times.

Hello there heroes!

I have migrated my scripts to the preview of PnP.PowerShelll this week. After running one, I noticed that the Set-PnPWebPermission cmdlet isn't working at all. Also, the documentation is missing. The page exists, but it shows a copy of the Set-PnPWebPartProperty documentation...

Expected behavior

The cmdlet runs :)

Actual behavior

  • Missing documentation
  • No auto-complete in the terminal
  • An error is thrown, even when the proper parameters are given:
 Set-PnPWebPermission : The parameter "Identity" is declared in parameter-set "__AllParameterSets" multiple times.
At line:1 char:1
+ Set-PnPWebPermission -
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : MetadataError: (:) [], MetadataException
    + FullyQualifiedErrorId : ParameterDeclaredInParameterSetMultipleTimes

Steps to reproduce behavior

Connect-PnPOnline -Url https://contoso.sharepoint.com -PnPManagementShell
Set-PnPWebPermission -User me -AddRole Read

or

Connect-PnPOnline -Url https://contoso.sharepoint.com -PnPManagementShell
Set-PnPWebPermission

or

Connect-PnPOnline -Url https://contoso.sharepoint.com -PnPManagementShell
Set-PnPWebPermission -Identity someweb

What is the version of the Cmdlet module you are running?

0.3.7

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Apply-PnPProvisioningTemplate includeItems not working

It looks like items will not be copied when using the "includeItems": true property in the PowerShell version SharePointPnPPowerShellOnline 3.23.2007.1.

I tried with a custom config.json, but also directly with the command Apply-PnPProvisioningTemplate -Path template.xml.
It doesn't seem to copy list items. Though, the list itself including all columns will be created.

The datarows are added to the .xml when I'm exporting the file, but they wouldn't be imported.

[BUG] Telemetry commands not available

Reporting an Issue or Missing Feature

Bug

Expected behavior

Disable-PnPPowerShellTelemetry and Enable-PnPPowerShellTelemetry commands to be available.

Commands are required to allow connection from an Azure Function as per #22 .
Commands were available on version 0.2.17-nightly

Actual behavior

Disable-PnPPowerShellTelemetry and Enable-PnPPowerShellTelemetry commands not available

Steps to reproduce behavior

Try to execute Disable-PnPPowerShellTelemetry and notice that the command is not available

What is the version of the Cmdlet module you are running?

0.3.25 (also tried a few versions before and same issue)

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Samples Update in lieu of Security Changes like MFA and Device Login

Most of the documented examples show using Credentials inline which fail in MFA situations or require manual interaction which defeats the purpose of scripting for DevOps processes. Is there guidance on a definitive pattern for connections and accesses and then we could potentially help update the old samples (some look like they go back to 2016!) to work in the "modern" world?

[BUG] Connect-PnPOnline from Azure Function

Reporting an Issue or Missing Feature

When connecting "Connect-PnPOnline" from Azure Function on PowerShell Core 7 an error is thrown

Connect-PnPOnline -Url $env:SPO_Url -ClientId $env:SPO_AppId -ClientSecret $env:SPO_AppSecret
The type initializer for 'Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource' threw an exception.

Expected behavior

Connection successful - context available

Actual behavior

Connect-PnPOnline -Url $env:SPO_Url -ClientId $env:SPO_AppId -ClientSecret $env:SPO_AppSecret
The type initializer for 'Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.CoreEventSource' threw an exception.

Steps to reproduce behavior

Create a new Azure Function with Application Insights enabled
Runtime version ~3
PowerShell Core 7
Platform x64
requirements.psd1 @{ 'PnP.PowerShell' = "0.1.31-nightly" }
Create a function and exec Connect-PnPOnline -Url [URL] -ClientId [AppId] -ClientSecret [AppSecret`]

What is the version of the Cmdlet module you are running?

PnP.PowerShell 0.1.31

[BUG] Cannot successfully use Register-PnPManagementShellAccess (per instructions)

Reporting an Issue or Missing Feature

Cannot successfully use Register-PnPManagementShellAccess per the instructions

Expected behavior

@ToddKlindt and I were trying out the process of moving from SharePointPnPPowerShellOnline to PnP.PowerShell. We know it's still a bit early, but we like understanding new stuff. Once I got my machine set up with PowerShell 7 and had PnP.PowerShell installed, I tried Connect-PnPOnline, expecting it wouldn't work on the first try, as shown in VS Code here.

image

Actual behavior

As shown in the screenshot above, I ran Register-PnPManagementShellAccess to set things up. The browser window popped up, I logged in, the browser window closed itself, and things just sat where they were in the image. Todd tested in a shell and had the same problem.

Instead, Todd tried closing the automatic browser window and manually going to http://microsoft.com/devicelogin in a browser tab. Logging in there took us to the consent dialog and Parker's PnP Management Shell was installed in Enterprise Applications.
image

Steps to reproduce behavior

Run Register-PnPManagementShellAccess and follow the prompts in the popup browser window.

What is the version of the Cmdlet module you are running?

0.3.14 nightly

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

New-PnPAzureCertificate: The FriendlyName value cannot be set on Unix.

Reporting an Issue or Missing Feature

When I execute New-PnPAzureCertificate on Mac OS Big Sur, I get an error stating that the FriendlyName cannot be set on Unix.

New-PnPAzureCertificate -OutPfx "pnp.pfx" -ValidYears 1 -CertificatePassword $secPassword

I haven't done much with these certificates before, but from everything I have read, i think I am doing it right.

Expected behavior

Output of a pfx file.

Actual behavior

The following error occurs on Mac OS Big Sur:
New-PnPAzureCertificate: The FriendlyName value cannot be set on Unix.

Steps to reproduce behavior

Please include complete code samples in-line or linked from gists

$Password = "mypassword"
$secPassword = ConvertTo-SecureString -String $Password -AsPlainText -Force
New-PnPAzureCertificate -OutPfx "pnp.pfx" -ValidYears 1 -CertificatePassword $secPassword

What is the version of the Cmdlet module you are running?

(you can retrieve this by executing Get-Module -Name sharepointpnppowershell* -ListAvailable)
PnP.PowerShell 0.3.3

Connect-PnPOnline System.Configuration.ConfigurationManager error

Reporting an Issue or Missing Feature

When connecting "Connect-PnPOnline" from Azure Function on PnP.PowerShell an error is thrown

$spConn = Connect-PnPOnline -Url $adminSiteURL -Credentials $o365credential -ReturnConnection

Expected behavior

The connection is established and a context is returned.

Actual behavior

I'm getting an error "Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'." with the following trace:

" Message : The type initializer for 'Microsoft.SharePoint.Client.ClientContextExtensions' threw an exception.
Data : System.Collections.ListDictionaryInternal
InnerException :
Type : System.IO.FileLoadException
Message : Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Could not find or load a specific file. (0x80131621)
FileName : System.Configuration.ConfigurationManager, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
TargetSite : Void .cctor()
StackTrace :
at Microsoft.SharePoint.Client.ClientContextExtensions..cctor()
InnerException :
Type : System.IO.FileLoadException
Message : Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'."

Steps to reproduce behavior

Create an Azure Function based on PowerShell Core. Run the Connect-PnPOnline command.

$spConn = Connect-PnPOnline -Url $adminSiteURL -Credentials $o365credential -ReturnConnection

What is the version of the Cmdlet module you are running?

Using the nightly build PnP.PowerShell 0.2.13.

[BUG] Connect-PnPOnline - Keyset does not exist

Reporting an Issue or Missing Feature

If I run Connect-PnPOnline locally using a certificate (stored in the local machine certificate store) and supplying the parameters (Tenant, Thumbprint and ClientId ) the command fails when using PnP.PowerShell (0.3.33):

Connect-PnPOnline -Url $Url -Tenant $tenant -Thumbprint $thumbprint -ClientId $clientId

Error message: Connect-PnPOnline: Keyset does not exist
Message : Keyset does not exist
Stacktrace : at PnP.PowerShell.Commands.Base.ConnectOnline.ProcessRecord() in D:\a\powershell\powershell\src\Commands\Base\ConnectOnline.cs:line 293
at System.Management.Automation.CommandProcessor.ProcessRecord()
ScriptLineNumber : 1

If I run the exact same command and parameters (Tenant, Thumbprint and ClientId ) on my local machine but use SharePointPnPPowerShellOnline (3.22.2006.2) the Connect-PnPOnline command works. The same command and parameters also works inside an Azure Function without any issues.

Expected behavior

Would expect the command to successfully establish a connection with SharePoint Online

Actual behavior

Error message: Connect-PnPOnline: Keyset does not exist
Message : Keyset does not exist
Stacktrace : at PnP.PowerShell.Commands.Base.ConnectOnline.ProcessRecord() in D:\a\powershell\powershell\src\Commands\Base\ConnectOnline.cs:line 293
at System.Management.Automation.CommandProcessor.ProcessRecord()
ScriptLineNumber : 1

Steps to reproduce behavior

Create App registration using certificate
Supply tenant, thumbprint and clientId as variables

Connect-PnPOnline -Url $Url -Tenant $tenant -Thumbprint $thumbprint -ClientId $clientId

What is the version of the Cmdlet module you are running?

0.3.33 - Have tried previous versions as well.

As I say above, the exact same command and parameter values works using the SharePointPnPPowerShellOnline module.

Which operating system/environment are you running PnP PowerShell on?

  • [x ] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

[BUG] Connect-PnPOnline cannot connect to USGovernment Cloud

Reporting an Issue or Missing Feature

Trying to connect to a GCC High instance in the USGovernment cloud, using an application registration with private certificate, Connect-PNPOnline returns the following error:
Connect-PnPOnline: AADSTS900382: Confidential Client is not supported in Cross Cloud request.

I'm calling Connect-PnPOnline as follows, with actual values for ClientId, Tenant, and Thumbprint:
Connect-PNPOnline -ClientId 00000000-0000-0000-0000-000000000000 -Url https://tenant.sharepoint.us
-Tenant tenant.onmicrosoft.us -Thumbprint 0000000000000000000000000000000000000000
-AzureEnvironment USGovernment

That last param makes no difference, can't seem to tell it to use the Gov cloud.

Expected behavior

I would expect the connection to succeed.

Actual behavior

Connect-PnPOnline: AADSTS900382: Confidential Client is not supported in Cross Cloud request.

Steps to reproduce behavior

Create a private certificate.
Import into Local and User Certificate store
Create App Registration in Azure AD, include certificate from above.
Assign API permissions and Grant them.
Try to connect from Connect-PnPOnline

What is the version of the Cmdlet module you are running?

Manifest 0.3.14 nightly PnP.PowerShell Core,Desk {Get-PnPSubWebs, Initialize-PowerShellA…

Which operating system/environment are you running PnP PowerShell on?

  • [X ] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

[BUG] Get-PnPApp Fails with access denied when connected using a SharePoint Addin Principal

On Mac OS I connect to a SharePoint site using a SharePoint Addin principal using the -ClientId and -ClientSecret parameters

The Addin principal was granted tenant scoped app-only permissions at the tenant SharePoint Admin centre

When I run the Get-PnPApp command I get an "Access denied. You do not have permission to perform this action or access this resource" error
PSCorePnPPowerShellGet-PnPApp

On Mac OS if I connect to the same SharePoint site using the -PnPManagementShell method, running Get-PnPApp returns the list of solutions as expected.

On Mac OS if I connect to the same SharePoint site using the Credentials method, running Get-PnPApp returns the list of solutions as expected.

On Windows* if I connect to the same SharePoint site using the Addin ClientId and ClientSecret with the SharePointPnPPowerShellOnline module, running Get-PnPApp returns the list of solutions as expected.
WinPnPPowerShellGet-PnPApp

Expected behavior

Connecting to a SharePoint site using a SharePoint Addin principal and running the ```Get-PnPApp` command should return the list of solutions

Actual behavior

An access denied error is returned

Steps to reproduce behavior

Create a SharePoint Addin registration

At the SharePoint Admin site grant the following permissions to the Addin principal

<AppPermissionRequests AllowAppOnlyPolicy="true">
  <AppPermissionRequest Scope="http://sharepoint/content/tenant" Right="FullControl"/>
  <AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl"/>
  <AppPermissionRequest Scope="http://sharepoint/search" Right="QueryAsUserIgnoreAppPrincipal"/>
  <AppPermissionRequest Scope="http://sharepoint/social/tenant" Right="FullControl"/>
  <AppPermissionRequest Scope="http://sharepoint/taxonomy" Right="Write"/>
</AppPermissionRequests>

Connect to a SharePoint site using the ClientId and ClientSecret for the addin registration

Run the Get-PnPApp command

What is the version of the Cmdlet module you are running?

PnP.PowerShell 0.3.4

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Add-PnPApp on Sharepoint 2019 Tenant using public url

Reporting an Issue or Missing Feature

I'm trying to add an App (sppkg) to SharePoint 2019 tenant app catalog from outside the server.
Add-PnPApp is using the internal url of the tenant site app catalog

Expected behavior

Using Get-PnPApp it works well listing all the installed apps on Tenant App Catalog
Using Add-PnPApp ,gives and error but should also use the current context to install the app on the Tenant App Catalog

Actual behavior

Using Add-PnPApp gives and error saying The remote name could not be resolved: 'debug-sp'
"debug-sp" is the internal host name of the server

Steps to reproduce behavior

Executing this outside the SP2019 server

# connecting outside the server using public url
Connect-PnP -url "http://publicurl.westus.cloudapp.azure.com/sites/classicteam"

#this works list all app from the tenant app catalog
Get-PnPApp

# this gives the error: The remote name could not be resolved: 'debug-sp'
Add-PnPApp -Path "complete_path_to_sppkg" -Scope Tenant

The only option that I have is to execute this only inside the SharePoint server, but I need to use outside

What is the version of the Cmdlet module you are running?

SharePointPnPPowerShell2019 3.25.2009.1

[BUG] Get-PnPSiteTemplate: The given key was not present in the dictionary.

Reporting an Issue or Missing Feature

When I use Get-PnPSiteTemplate, I'm receiving "the given key was not present in the dictionary". This is the same error that I was getting with Invoke-PnPSiteTemplate until it was fixed in last night's build (0.3.33).

Actual behavior

An error displayed: "Get-PnPSiteTemplate: The given key was not present in the dictionary."

Steps to reproduce the behavior

Connect-PnPOnline -Url {siteUrl} -ClientId {clientID} -Tenant {tenant} -CertificatePath ..\{fileName}.pfx
Get-PnPSiteTemplate -Out {filename}.xml -PersistBrandingFiles -PersistPublishingFiles -IncludeAllPages

What is the version of the Cmdlet module you are running?

ModuleType Version    PreRelease Name                                PSEdition
---------- -------    ---------- ----                                --------- 
Manifest   0.3.33     nightly    PnP.PowerShell                      Core,Desk

Which operating system/environment are you running PnP PowerShell on?

  • [ X] Windows

Set-PnPLabel does not check for GetAvailableTagsForSite

Reporting an Issue or Missing Feature

Set-PnPLabel does not check for GetAvailableTagsForSite.

Expected behavior

When applying label from SharePoint site (List Settings> Apply Label), we only see the Labels that are available for the site. If a Label is passed that is not available for the site, we would expect an error stating the Label is not available for the site.

Actual behavior

Set-PnPLabel applies a Label that is not available for the specific site as long as the Label exists in Security and Compliance Center. This differs from the behavior in the site.

Steps to reproduce behavior

  • Create a Retention Label Policy and publish one or more retention labels to that policy.
  • Apply that Policy to a SharePoint site.
  • Verify the labels from previous step are available in the site (dropdown in List Settings> Apply Label to this list/library)
  • now, Set-PnPLabel -List $list -Label -BlockDeletion $true BlockEdit $true SyncToItems $true

What is the version of the Cmdlet module you are running?

Latest. You can reproduce this issue in any versions of PnP.PowerShell or SharePointPnPPowerShellOnline.

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

[BUG] Planner commands have -Group parameter as required - giving no option to just select using -PlanId

Reporting an Issue or Missing Feature

The Add-PnPPlannerBucket documentation states you should be able add a Planner using just -Plan (id or name) and not have to state a -Group. I am unable to just enter a -Plan and instead I am also requested to enter a -Group (name or id). The command works if I enter both a -Plan (id or name) AND - Group (id or name).

Add-PnPPlannerTask -Plan "odmeGVFLm02Xb0C9rWMtg5cACLXR" -Bucket "Bucket 4" -Title "Test"

The same behaviour occurs on the following other Planner commands (unable to select by just -Plan and then -Group is requested - contrary to the documentation.)

  • Add-PnPPlannerBucket
  • Get-PnPPlannerBucket
  • Get-PnPPlannerTask
  • Remove-PnPPlannerBucket
  • Set-PnPPlannerBucket
  • Set-PnPPlannerPlan

For adding planner tasks in Microsoft Graph PlanId is only required https://docs.microsoft.com/en-us/graph/api/planner-post-tasks?view=graph-rest-1.0&tabs=http and no group id is required.

Expected behaviour

To be able to add a Planner task using Plan id or name

Actual behaviour

Execute the Add-PnPPlannerTask command using -Plan and don't specify a -Group. I am then asked for Group as it is a required parameter or otherwise it will not execute.

image

Steps to reproduce behaviour

Create a Plan and bucket.
Execute PowerShell below (change to a Plan name or PlanId in your tenant and a valid bucket)

Add-PnPPlannerTask -Plan "odmeGVFLm02Xb0C9rWMtg5cACLXR" -Bucket "Bucket 4" -Title "Test"

What is the version of the Cmdlet module you are running?

0.3.29

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Thanks

[BUG] - Error calling Register-PnPManagementShellAccess

Reporting an Issue or Missing Feature

When trying to run Register-PnPManagementShellAccess in Visual Studio code, the Intergated Powershell console throws an error

Expected behavior

Run Register-PnPManagementShellAccess
Copy Code
Open Browser
Paste Code
Authentication

Actual behavior

Run Register-PnPManagementShellAccess

Error appears:

Register-PnPManagementShellAccess: The WriteObject and WriteError methods cannot be called from outside the overrides of the BeginProcessing, ProcessRecord, and EndProcessing methods, and they can only be called from within the same thread. Validate that the cmdlet makes these calls correctly, or contact Microsoft Customer Support Services.

Steps to reproduce behavior

Run Register-PnPManagementShellAccess
Using version 1.50.1 of VSCode

Running the command in the Windows Terminal is successful.

What is the version of the Cmdlet module you are running?

Running preview version 0.1.29 of the Cmdlet

[BUG] - Authentication

Reporting an Issue or Missing Feature

I am unable to use Connect-PnPOnline with this pre-release where I am not a global admin.

Expected behavior

On an environment where I am global admin:
Register-PnPManagementShellAccess (as global admin),
Connect-PnPOnline -url $url -Credentials $cred (as same global admin)
Get-PnPWeb
Shows web details as expected

This is working fine. I also need to be able to connect in an environment where I am not a global admin.

Actual behavior

Get 403 error
Connect-PnPOnline : The remote server returned an error: (403) Forbidden.
At line:1 char:1

  • Connect-PnPOnline -Url $url
  •   + CategoryInfo          : NotSpecified: (:) [Connect-PnPOnline], WebException
      + FullyQualifiedErrorId : System.Net.WebException,PnP.PowerShell.Commands.Base.ConnectOnline
    
    

I am Site Collection Admin on the site at $url.

Steps to reproduce behavior

On a separate environment where I am not a globlal admin but I am SP Admin:
Get global admin to run Register-PnPManagementShellAccess
Add my account as user to Enterprise App "PnP Management Shell" in Azure AD

1
Connect-PnPOnline -url $url -Credentials $cred
403 error as above

2
Register-PnPManagementShellAccess (using my account)
Connect-PnPOnline -url $url -Credentials $cred
403 error as above

3
Connect-PnPOnline -url $url
Prompts for credentials
403 error as above

4
Connect-PnPOnline -url $url -PnPManagementShell -LaunchBrowser
Browser opens, paste in code, authenticate using my creds, advised successful, close browser
No error
Get-PnPWeb
403 error as above
Get-PnPContext and Get-PnPConnection both show details including the $url above

I appreciate this may just be my lack of understanding how this is intended to work but as yet, there seems to be little documentation available. I have just assumed that Register-PnPManagementShellAccess needed to be run by a global admin as it throws an error if run by a non global admin.

One of the reasons I am testing this early is because I need to use PnP PowerShell in an Azure function app but there is a bug in v1 functions. How does app-only auth work? Does it still need the Register-PnPManagementShellAccess??

What is the version of the Cmdlet module you are running?

0.1.23

[BUG]

Reporting an Issue or Missing Feature

Issue

Expected behavior

Should work without any issues

Actual behavior

Please describe what you see instead. Please provide samples of HTML output or screenshots
image

Steps to reproduce behavior

image

What is the version of the Cmdlet module you are running?

(you can retrieve this by executing Get-Module -Name sharepointpnppowershell* -ListAvailable)
image

[BUG] I can't use Connect-PnPOnline PowerShell 7.0

Notice

Many bugs reported are actually related to the PnP Framework which is used behind the scenes. Consider carefully where to report an issue:

  1. I'm using Connect-PnPOnline -Url
    Connect-PnPOnline: The remote server returned an error: (400) Bad Request.

  2. PowerShell Version 7.0.0

  3. If I use **Connect-PnPOnline -Url ... -ClientId ... -ClientSecret ... ** I got the error below:
    Connect-PnPOnline: The type initializer for 'OfficeDevPnP.Core.Utilities.TokenHelper' threw an exception.

What is the version of the Cmdlet module you are running?

I already installed the PnP.PowerShell module, but I can't see the version, when I run
Get-Module -Name "PnP.PowerShell" -ListAvailable
I cannot see anything

Which operating system/environment are you running PnP PowerShell on?

  • [ X ] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • [ X ] Azure Functions
  • Other : please specify

[BUG] - Connect-PnPOnline results in a 401 Unauthorized error

Reporting an Issue or Missing Feature

Attempting to connect to a SharePoint site using Connect-PnPOnline in PS 7.0.3 results in a "Connect-PnPOnline: The remote server returned an error: (401) Unauthorized." error. Using the same credentials with SharePointPnPPowershellOnline v3.26.2010.0 and PS 5.1 works fine.

Expected behavior

Executing the following commands will connect to the site

$cred = Get-Credential
Connect-PnPOnline -Url http://[tenant-name].sharepoint.com/sites/Test1 -Credentials $cred

Actual behavior

Executing the following commands results in an error

$cred = Get-Credential
Connect-PnPOnline -Url http://[tenant-name].sharepoint.com/sites/Test1 -Credentials $cred
Connect-PnPOnline: The remote server returned an error: (401) Unauthorized.

Steps to reproduce behavior

$cred = Get-Credential
Connect-PnPOnline -Url http://[tenant-name].sharepoint.com/sites/Test1 -Credentials $cred

What is the version of the Cmdlet module you are running?

0.2.20
PS 7.0.3

[BUG] Cannot connect with credentials

Notice

Many bugs reported are actually related to the PnP Framework which is used behind the scenes. Consider carefully where to report an issue:

  1. Are you using Invoke-PnPSiteTemplate or Get-PnPSiteTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/pnp/pnpframework/issues.
  2. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
  3. If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/pnp/powershell/tree/master/src/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/pnp/pnpframework/issues

Reporting an Issue or Missing Feature

Please confirm what it is that your reporting

Expected behavior

Please describe what output you expect to see from the PnP PowerShell Cmdlets
Connect-PnPOnline is able to connect to SharePoint Online.

Actual behavior

Please describe what you see instead. Please provide samples of output or screenshots.
Returns error...
Connect-PnPOnline : The sign-in name or password does not match one in the Microsoft account system.

This would be expected with MFA. However MFA is not enabled here.

Steps to reproduce behavior

Please include complete script or code samples in-line or linked from gists
$URL = "https://mysite.sharepoint.com"
$login = "[email protected]"
$pwd = "secure-password"

$pwd = ConvertTo-SecureString $pwd -AsPlainText -Force;
$credentials = new-object -typename System.Management.Automation.PSCredential -argumentlist $login, $pwd

Connect-PnPOnline -Url $url -Credentials $credentials

What is the version of the Cmdlet module you are running?

(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable)

Which operating system/environment are you running PnP PowerShell on?

  • [ X] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Add-PnPTeamsChannel not working for private channels

this is the output I receive when I try to create a private channel (with version 0.1.10-nightly / 0.1.11-nightly)*

Add-PnPTeamsChannel -Team "My Team" -DisplayName "My Channel" -Private -ownerUPN "[email protected]"

Add-PnPTeamsChannel : Navigation binding uri
'https://graph.microsoft.com/beta/users/('ObjectID')' has unexpected resource path.
ExpectedResourcePath:'/users'
At line:1 char:1
+ Add-PnPTeamsChannel -Team "My Team" -DisplayName "My Channel" - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [Add-PnPTeamsChannel], PSInvalidOperationException
+ FullyQualifiedErrorId : InvalidOperation,SharePointPnP.PowerShell.Commands.Graph.AddTeamsChannel

for me it looks like the resource path should be more like
https://graph.microsoft.com/beta/users('ObjectID')
instead of
https://graph.microsoft.com/beta/users/('ObjectID')

*it's also the same with SharePointPnPPowerShellOnline 3.26.2010.0 and all other versions I tested

Invoke-PnPSiteTemplate fails with (and without) ClientSidePages in template definition

Category

  • Bug

Describe the bug

Using 0.3.33-nightly, I am able to successfully use Connect-PnPOnline with parameters Tenant, ClientId, and CertificatePath. However, when attempting to apply template to site, I am receiving errors: one error when my template includes ClientSidePages references and another when it does not. I had seen references to other issues with ClientSidePages, so I tested with and without. I was able to previously successfully use the Invoke-PnPSiteTemplate command when my template included a reference to ClientSidePages, so I will continue this report assuming the reference is contained within my template.

image

Steps to reproduce

  1. Referring to this step within MS guide
  2. Configure Azure Function and Queue setup described in step 0
  3.     Connect-PnPOnline -Tenant 'xxx.onmicrosoft.com' -ClientId yyy -CertificatePath D:\home\site\wwwroot\InvokePnPSiteTemplate\cert.pfx -Url $QueueItem
    
  4. Invoke-PnPSiteTemplate -Path D:\home\site\wwwroot\InvokePnPSiteTemplate\PnPTemplate.xml
    

Expected behavior

Template applied without errors.

Environment details (development & target environment)

OS Windows 10
Additional details : Using PnP.PowerShell 0.3.33-nightly

Additional context

  • Assuming that ClientSidePages is within template

[BUG] "The user cannot create group sites in this tenant instance."

Reporting an Issue or Missing Feature

Error when trying to create new Geo site using New-PnPSite

Expected behavior

New team site created in the correct GEO location

Actual behavior

New-PnPSite : {"error":{"code":"-2146232832, Microsoft.SharePoint.SPException","message":"The user cannot create group
sites in this tenant instance."}}
image

Steps to reproduce behavior

Connect-PnPOnline -Url "https://XXXnam.sharepoint.com" -Credentials $cred;
New-PnPSite -Type TeamSite -Title "Save to Delete" -Alias "XXXSV009" -Wait;

Which version of the PnP-PowerShell Cmdlets are you using?

  • PnP PowerShell for SharePoint 2013
  • PnP PowerShell for SharePoint 2016
  • PnP PowerShell for SharePoint 2019
  • PnP PowerShell for SharePoint Online

What is the version of the Cmdlet module you are running?

0.3.23

How did you install the PnP-PowerShell Cmdlets?

  • MSI Installed downloaded from GitHub
  • Installed through the PowerShell Gallery with Install-Module
  • Other means

[BUG] Register-PnPManagementShellAccess: The WriteObject and WriteError methods cannot be called from outside the overrides of the BeginProcessing, ProcessRecord, and EndProcessing methods, and they can only be called from within the same thread. Validate that the cmdlet makes these calls correctly, or contact Microsoft Customer Support Services.

Reporting an Issue or Missing Feature

I am unable to run Register-PnPManagementShellAccess successfully.

Expected behavior

Registers without issue.

Actual behavior

Register-PnPManagementShellAccess: The WriteObject and WriteError methods cannot be called from outside the overrides of the BeginProcessing, ProcessRecord, and EndProcessing methods, and they can only be called from within the same thread. Validate that the cmdlet makes these calls correctly, or contact Microsoft Customer Support Services.

Steps to reproduce behavior

I'm using PS 7 and VSCode.

What is the version of the Cmdlet module you are running?

Manifest 0.2.2 nightly PnP.PowerShell {Add-Alert, Add-App, Add-ApplicationCustomizer, Add-ClientSidePage…}

[FEATURE] Add site Id to output of Get-PnPTenantSite

Is your feature request related to a problem? Please describe.
Get-PnPTenantSite doesn't return site Id.

Describe the solution you'd like
Get-PnPTenantSite returns a site Id.

Describe alternatives you've considered
Currently we use the following cmdlets to get the site Id:

Connect-PnPOnline -Url $tenant_site_url -Credentials $cred
$sites=Get-PnPTenantSite -Detailed
foreach($tenant_site in $sites){
    Connect-PnPOnline -Url $tenant_site.Url -Credentials $cred
    $site = Get-PnPSite -Includes ID
}

Unfortunately additional cmdlets takes much time to execute.

[BUG] Connect-PnPOnline not working with Admin Account that has MFA and -LaunchBrowser

Reporting an Issue or Missing Feature

Connect-PnPOnline not working with Admin Account that has MFA and -LaunchBrowser

Expected behavior

Successful connection to SharePoint Online

Actual behavior

Command hangs in PowerShell session.

Steps to reproduce behavior

Register-PnPManagementShellAccess
appeared to work using MFA account (browser launched for device code, password and SMS PIN code)
Consent granted (account is a tenant admin)

Connect-PnPOnline -Url [team site Url] -PnPManagementShell -LaunchBrowser
browser opened for device code and password, but no prompt for MFA code. Command hangs in PowerShell session.

image

Connection is successful if the -LaunchBrowser param is omitted and a browser is manually opened with https://microsoft.com/devicelogin

What is the version of the Cmdlet module you are running?

Manifest 0.3.25 nightly PnP.PowerShell

Which operating system/environment are you running PnP PowerShell on?

Name Value
PSVersion 7.1.0
PSEdition Core
GitCommitId 7.1.0
OS Microsoft Windows 10.0.18363
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

[BUG] Add-PnPFile message too big error message missing

Notice

Add-PnPFile

Reporting an Issue or Missing Feature

Issue

Expected behavior

error message should be like:
Add-PnPFile : The request message is too big. The server does not allow messages larger than 262144000 bytes.
(as it was in SharePointPnPPowerShellOnline 3.28.2012.0)

Actual behavior

error message is:
Add-PnPFile : The underlying connection was closed: An unexpected error occurred on a send.

Steps to reproduce behavior

$out = new-object byte[] 1073741824
(new-object Random).NextBytes($out)
$TempRandomFile = $env:TEMP+""+(get-date -Format "yyyyMMddHHmmss")+"1GBrandom.data"
[IO.File]::WriteAllBytes($TempRandomFile, $out)
$UploadTime = Measure-Command {Add-PnPFile -Path $TempRandomFile -Folder "/Shared Documents/General"}
$out=""
Remove-Item $TempRandomFile -Force

What is the version of the Cmdlet module you are running?

0.3.6 PnP.PowerShell

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

[FEATURE] PSDefaultParameterValues are not respected by Connect-PnPOnline

Expected behavior

PSDefaultParameter settings will remove the need to specify them manually each time.

Actual behavior

image

Workaround

Splatting (sort of)

What is the version of the Cmdlet module you are running?

0.3.6-nightly

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

[FEATURE] Prefix all commands with PnP or something similar

Is your feature request related to a problem? Please describe.
Having commands like Get-Site encourage non-namespaced cmdlets which may conflict or clobber with other modules. PnP doesn't have absolute domain over this space and should follow standard practices for this.

Describe the solution you'd like
By default only load prefixed commands (e.g. Get-PnPSite) and for compatability allow for a setting (global variable, cmdlet, etc.) that will enable aliases to the non-namespaced cmdlets like Get-Site

This will allow those who need the compatibility for legacy scripts to enable it, but encourage new scripts to use a more standard powershell convention.

[BUG] Get-PnPCustomAction Does Not Find Any Custom Actions

Reporting an Issue or Missing Feature

I am reporting a bug

Expected behavior

I am expecting to get a list of custom actions when running Get-PnPCustomAction against a site that definitely has user custom action.
If running `Get-PnPCustomAction``` command that is a part of SharePointPnPPowerShellOnline 3.26.2010.0 module
image

I am getting the following results:
image

Actual behavior

If I run the same code from "Expected behavior" section with PnP.PowerShell 0.3.18 loaded
image
I am getting an error:
Get-PnPCustomAction: No CustomAction found with the Identity "00000000-0000-0000-0000-000000000000" within the scope 'Web
image

Specifying Web or Identity parameters would be no help (although an error returned is different):
image

Steps to reproduce

Connect-PnPOnline -Url https://tenantname.sharepoint.com/sites/sitename $PnPSite = Get-PnPSite -Connection $PnPConnectionSite -includes UserCustomActions PnPConnection = Get-PnPConnection Get-PnPCustomAction -ThrowExceptionIfCustomActionNotFound -Connection $PnPConnectionSite

What is the version of the Cmdlet module you are running?

Non-working environment
image

Name    : Get-PnPCustomAction
Source  : pnp.powershell
Version : 0.3.18

Working Environment:
image

Name    : Get-PnPCustomAction
Source  : SharePointPnPPowerShellOnline
Version : 3.26.2010.0

Which operating system/environment are you running PnP PowerShell on?

  • [X ] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

[BUG] Connect-PnPOnline Wouldn't Connect using Credentials Method

Reporting an Issue or Missing Feature

I am reporting a bug

Expected behavior

This is what I get with SharePointPnPPowerShellOnline 3.26.2010.0
image

Actual behavior

This is what I get when trying to use PnP.PowerShell 0.3.18-nigthly
image

Error in plain text:

Connect-PnPOnline: AADSTS65001: The user or administrator has not consented to use the application with ID '31359c7f-bd7e-475c-86db-fdb8c937548e' named 'PnP Management Shell'. Send an interactive authorization request for this user and resource.
Trace ID: b3e577fa-fd38-42d8-bcbd-d6f387331400
Correlation ID: 50cf494e-409d-443e-b901-1f32725ebc39
Timestamp: 2020-12-29 23:36:40Z

Using Connect-PnPOnline -UseWebLogn would pop up a web login prompt but pop up window will stuck there showing a white screen
image
Please note we have federation enabled.

Steps to reproduce behavior

Install-Module PnP.PowerShell -AllowPrerelease
$credentials = Get-Credential
Connect-PnPOnline -Url https://tenant.sharepoint.com -Credential $credentials
Connect-PnPOnline -Url https://tenant.sharepoint.com -UseWebLogin

What is the version of the Cmdlet module you are running?

Non-working environment
image

Name    : Get-PnPCustomAction
Source  : pnp.powershell
Version : 0.3.18

Working Environment:
image

Name    : Get-PnPCustomAction
Source  : SharePointPnPPowerShellOnline
Version : 3.26.2010.0

Which operating system/environment are you running PnP PowerShell on?

  • [X ] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

SharePoint download/upload file as stream using Powershell Get-PnPFile and Add-PnPFile

I am trying to download file from source SharePoint site using

    $fileSource = Get-PnPFile -Url $filePath -AsFileObject -Connection $sourceConnection

But how to upload the file to another SharePoint site using the returned $fileSource

    $fileDest = Add-PnPFile -FileName $filename -Folder "uploadFolder" -Stream <what goes here?> -Connection $destConnection

I tried

    $fileDest = Add-PnPFile -FileName $filename -Folder "uploadFolder" -Stream $fileSource -Connection $destConnection

and it doesn't work.

[BUG] New-PnPTeamsTeam - 'PnP.PowerShell.Commands.Model.Graph.GraphException' was thrown.

Reporting an Issue or Missing Feature

When trying to use the command New-PnPTeamsTeam I receive the following error:
New-PnPTeamsTeam -DisplayName "Test PnP Team" -MailNickName "TestPnPTeam"

New-PnPTeamsTeam: Exception of type 'PnP.PowerShell.Commands.Model.Graph.GraphException' was thrown.

I have tried using Connect-PnPOnline with the scopes parameter (Connect-PnPOnline -Scopes "Group.ReadWrite.All") and with clientId and ClientSecret (Connect-PnPOnline -ClientId $clientId -ClientSecret $clientSecret -AADDomain $tenant).

Expected behavior

New Team called Test PnP Team would be created in Teams with an email address of TestPnPTeam

Actual behavior

image

Steps to reproduce behavior

  1. Connect-PnPOnline -Scopes "Group.ReadWrite.All"
  2. New-PnPTeamsTeam -DisplayName "Test PnP Team" -MailNickName "TestPnPTeam"

What is the version of the Cmdlet module you are running?

PnP.PowerShell - 0.3.33

Which operating system/environment are you running PnP PowerShell on?

  • [x ] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

[FEATURE] Azure Cloud Shell integration

Is your feature request related to a problem? Please describe.
Since Azure Cloud Shell ships the PNP m365 CLI by default, we'd love to include the PNP PowerShell module too. (I'm the engineering manager for Cloud Shell.) Ideally this would also include supporting the implicit authentication that Cloud Shell enables via exposing a Managed Identity endpoint which can provide oauth tokens based on the logged-in user's credentials.

Describe the solution you'd like
Submit a PR to github.com/Azure/CloudShell which adds this module to the list of preinstalled PowerShell modules. It would probably make most sense to do this when the module is no longer considered preview.

In case of questions feel free to ask!

Initialize-PnPPowerShellAuthentication : The term 'Initialize-PnPPowerShellAuthentication' is not recognized as the name of a cmdlet

Notice

Reporting an Issue or Missing Feature

Initialize-PnPPowerShellAuthentication : The term 'Initialize-PnPPowerShellAuthentication' is not recognized as the name of a cmdlet

Expected behavior

Initialize-PnPPowerShellAuthentication does not exist in Module -Name PnP.PowerShell

What is the version of the Cmdlet module you are running?

(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable)
ModuleType Version Name ExportedCommands


Manifest 0.3.23 PnP.PowerShell

Which operating system/environment are you running PnP PowerShell on?

  • [x ] Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

[BUG] Add an App through tenant template fails when using certificate authentication, Add-PnPApp works

Notice

I assume this is in essence a PnP Framework issue, but I do not grasp the full complexity of authentication in PnP Powershell. If this needs to be moved, I'll gladly do it.
I haven't written C# code directly against PnP Framework to try if it also fails over there.

Reporting an Issue or Missing Feature

When I login using a certificate, app-only, adding an .sppkg to the tenant app catalog fails when using Apply-PnPTenantTemplate. Using the same logged in session, I can invoke Add-PnPApp without issue.

Expected behavior

I expect this to work:

Connect-PnPOnline -Url https://{tenant}-admin.sharepoint.com -ClientId {appId} -Tenant {tenantId} -CertificatePath "{path}\{to}\{certificate}.pfx"
Invoke-PnPTenantTemplate -Path "{path}\{to}\{template}.pnp"

My template contains

  <pnp:Tenant>
    <pnp:AppCatalog>
      <pnp:Package Action="UploadAndPublish" Overwrite="true" Src=".\{package}.sppkg" SkipFeatureDeployment="true" />
    </pnp:AppCatalog>
  </pnp:Tenant>

Actual behavior

Invoke-PnPTenantTemplate returns with

Invoke-PnPTenantTemplate: Your template contains artifacts that require an access token. Please provide consent to the PnP Management Shell application first by executing: Register-PnPManagementShellAccess

It should work since Add-PnPApp works and I used the same appId and Certificate through CLI for M365 and that works too.
Also, it does not really make sense to suggest Register-PnPManagementShellAccess as I am using my own appId.

Steps to reproduce behavior

  • Create a custom Azure AD app registration, add correct permissions and certificate
  • Login with Certificate authentication
  • Execute Invoke-PnPTenantTemplate

What is the version of the Cmdlet module you are running?

0.2.6-nightly

Publishing official docker image with the module

Hi, it would be nice to be able to use the module without installing it on host. One way to achieve that will be installing the module in a container. The easiest is referring to a public image that the community is maintaining on Docker Hub.

Here's an example of the Dockerfile I quickly tested:

FROM mcr.microsoft.com/powershell:lts-debian-10
RUN pwsh -Command "Install-Module PnP.PowerShell -RequiredVersion 0.1.14-nightly -AllowPrerelease -Force"

When we publish it, anyone can start using the module without installing it, something like this:

docker run -it --rm pnp/powershell:0.1.14-nightly

I can commit if you consider this appropriate

Apply-PnPTenantTemplate : Object reference not set to an instance of an object

Category

  • Bug

Describe the bug

I have now seen this Apply-PnPTenantTemplate issue, when trying to deploy the starter-kit v2 on my dev tenant. Towards the end of this (protacted😣) post , I switched to the -PnPO365ManagementShell. Note, I have also seen similar issues with with -SPOManagementShell

Connect-PnPOnline -Url $adminSiteUrl -PnPO365ManagementShell
Then trying to deploy with a stripped down provisioning template ( see starterkit-debug.zip)
starterkit-debug.zip

powershell.exe Information: 0 : 2020-07-10 15:34:20.2784        [OfficeDevPnP.Core]     [0]     [Information]   File starterkit-debug.pnp retrieved from folder         0ms
powershell.exe Information: 0 : 2020-07-10 15:34:20.2794        [OfficeDevPnP.Core]     [0]     [Information]   File starterkit-debug.pnp retrieved from folder         0ms
powershell.exe Information: 0 : 2020-07-10 15:34:20.2904        [OfficeDevPnP.Core]     [0]     [Information]   File starterkit-debug.xml retrieved from folder         0ms
powershell.exe Information: 0 : 2020-07-10 15:34:20.3214        [Provisioning]  [14]    [Debug] Code execution scope started    0ms     53c92515-498c-43d1-9bf9-4f66346423d1
powershell.exe Information: 0 : 2020-07-10 15:34:20.3224        [Provisioning]  [14]    [Information]   ProgressDelegate registered     0ms     53c92515-498c-43d1-9bf9-4f66346423d1
powershell.exe Information: 0 : 2020-07-10 15:34:20.3224        [Provisioning]  [14]    [Information]   MessagesDelegate registered     0ms     53c92515-498c-43d1-9bf9-4f66346423d1
powershell.exe Information: 0 : 2020-07-10 15:34:20.7681        [ProvisioningTemplate WebHook Call]     [14]    [Debug] Code execution scope started    0ms     53c92515-498c-43d1-9bf9-4f66346423d1
powershell.exe Information: 0 : 2020-07-10 15:34:20.7701        [ProvisioningTemplate WebHook Call]     [14]    [Debug] Code execution scope ended      1ms     53c92515-498c-43d1-9bf9-4f66346423d1
powershell.exe Information: 0 : 2020-07-10 15:34:20.7921        [Provisioning]  [14]    [Debug] Code execution scope started    0ms     53c92515-498c-43d1-9bf9-4f66346423d1
powershell.exe Information: 0 : 2020-07-10 15:34:22.9220        [Provisioning]  [14]    [Debug] Code execution scope ended      2130ms  53c92515-498c-43d1-9bf9-4f66346423d1
powershell.exe Information: 0 : 2020-07-10 15:34:22.9230        [ProvisioningTemplate WebHook Call]     [14]    [Debug] Code execution scope started    0ms     53c92515-498c-43d1-9bf9-4f66346423d1
powershell.exe Information: 0 : 2020-07-10 15:34:22.9230        [ProvisioningTemplate WebHook Call]     [14]    [Debug] Code execution scope ended      0ms     53c92515-498c-43d1-9bf9-4f66346423d1
powershell.exe Information: 0 : 2020-07-10 15:34:22.9230        [Provisioning]  [14]    [Debug] Code execution scope ended      2601ms  53c92515-498c-43d1-9bf9-4f66346423d1
Apply-PnPTenantTemplate : Object reference not set to an instance of an object.
At line:1 char:1
+ Apply-PnPTenantTemplate -Path starterkit-debug.pnp
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [Apply-PnPTenantTemplate], NullReferenceException
    + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.Tenant.ApplyTenantTemplate

@eoverfield, suggested inspecting CurrentUserLoginName , MFA or Auth Method values. I am happy to run a debug version of the Commandlet if this exists.

Expected or Desired Behavior

The StarterKit v2 to be deployed on my (FR) Dev tenant.

Observed Behavior

As above

Steps to Reproduce

$kit = Read-PnPTenantTemplate -Path ..\source\templates\starterkit-debug.xml
Save-PnPTenantTemplate -Template $kit -Out starterkit-debug.pnp -Force
Apply-PnPTenantTemplate -Path starterkit-debug.pnp -Parameters @{"PORTALURL"="/sites/agilearchitecture"; "MARKETINGALIAS"="kanbankings";   "HRALIAS"="scrumsuperhereos" } 

Environment Details (Development & Target environment)

  • Starter kit version: v2
  • OS: Windows 10
  • Target Environment: SharePoint Online
  • Framework: Node v12.18.1 SPFx 1.10
  • SharePointPnPPowerShellOnline: 3.22.2006.2
  • Browser(s): Chromium Edge v79

[BUG] Issue when applying tenant template using AAD app-only access

Reporting an Issue or Missing Feature

I believe this may be an issue in PnP PowerShell and not the provisioning engine, but happy to move it if wrong location.

Invoke-PnPTenantTemplate fails the first time when provisioning a template with a related SharePoint site and Teams team.
This only happens when connecting using Azure AD app-only access. If connecting using a user account (username + password) all works as expected.

image

Expected behavior

Be able to connect using ADD app-only and apply a tenant template for SharePoint and Teams.

Actual behavior

The first time the command is executed it will fail as per the image above. If we execute the command a second time, it works.

Steps to reproduce behavior

Register an Azure AD app as per the following documentation: https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread

Create an XML template which provisions a SharePoint Site and Teams team: example: https://www.collabmagazine.com/provisioning-teams-in-microsoft-teams-using-the-pnp-provisioning-engine/

Connect to SharePoint using AAD app registration (Client ID + Tenant + Thumbprint)

Execute Invoke-PnPTenantTemplate --> this should fail the first time
Execute Invoke-PnPTenantTemplate a second time --> this should now work

What is the version of the Cmdlet module you are running?

0.2.22

[BUG] Get an error when trying to export SiteTemplate to file .pnp

Notice

Want to copy one SPO site to another.

Reporting an Issue or Missing Feature

Issue

Expected behavior

Previous cmdlet: Get-PnPProvisioningTemplate works correctly. It exported whole site to .pnp file and restore it on another site. Now I have problem with Get-PnPSiteTemplate.

Actual behavior

PS C:\Users\maciej.kukulka> Get-PnPSiteTemplate -Out prototype.pnp -Force
WARNING: You need to be a SharePoint admin to extract Hub site Url.
Get-PnPSiteTemplate : The property or field 'ServerRelativePath' has not been initialized. It has not been requested or
 the request has not been executed. It may need to be explicitly requested.
At line:1 char:1
+ Get-PnPSiteTemplate -Out prototype.pnp -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [Get-PnPSiteTemplate], PropertyOrFieldNotInitializedException
    + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Provisioning.Site.GetSiteTemplate

Steps to reproduce behavior

Please include complete code samples in-line or linked from gists

What is the version of the Cmdlet module you are running?

Oh, this is another problem I have ;)

PS C:\Users\maciej.kukulka> Install-Module SharePointPnPPowerShellOnline

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): a
PackageManagement\Install-Package : The following commands are already available on this system:'Invoke-PnPSearchQuery,
Add-PnPAlert,Add-PnPApp,Add-PnPApplicationCustomizer,Add-PnPClientSidePage,Add-PnPClientSidePageSection,Add-PnPClientSi
deText,Add-PnPClientSideWebPart,Add-PnPContentType,Add-PnPContentTypeToDocumentSet,Add-PnPContentTypeToList,Add-PnPCust
omAction,Add-PnPDocumentSet,Add-PnPEventReceiver,Add-PnPField,Add-PnPFieldFromXml,Add-PnPFieldToContentType,Add-PnPFile
,Add-PnPFolder,Add-PnPHtmlPublishingPageLayout,Add-PnPHubSiteAssociation,Add-PnPIndexedProperty,Add-PnPJavaScriptBlock,
Add-PnPJavaScriptLink,Add-PnPListItem,Add-PnPMasterPage,Add-PnPMicrosoft365GroupMember,Add-PnPMicrosoft365GroupOwner,Ad
d-PnPMicrosoft365GroupToSite,Add-PnPNavigationNode,Add-PnPOrgAssetsLibrary,Add-PnPOrgNewsSite,Add-PnPPublishingImageRen
dition,Add-PnPPublishingPage,Add-PnPPublishingPageLayout,Add-PnPRoleDefinition,Add-PnPSiteClassification,Add-PnPSiteCol
lectionAdmin,Add-PnPSiteCollectionAppCatalog,Add-PnPSiteDesign,Add-PnPSiteDesignTask,Add-PnPSiteScript,Add-PnPStoredCre
dential,Add-PnPTaxonomyField,Add-PnPTeamsChannel,Add-PnPTeamsTab,Add-PnPTeamsTeam,Add-PnPTeamsUser,Add-PnPTenantCdnOrig
in,Add-PnPTenantSequence,Add-PnPTenantSequenceSite,Add-PnPTenantSequenceSubSite,Add-PnPTenantTheme,Add-PnPUserToGroup,A
dd-PnPView,Add-PnPWebhookSubscription,Add-PnPWebPartToWebPartPage,Add-PnPWebPartToWikiPage,Add-PnPWikiPage,Approve-PnPT
enantServicePrincipalPermissionRequest,Clear-PnPDefaultColumnValues,Clear-PnPListItemAsRecord,Clear-PnPMicrosoft365Grou
pMember,Clear-PnPMicrosoft365GroupOwner,Clear-PnPRecycleBinItem,Clear-PnPTenantAppCatalogUrl,Clear-PnPTenantRecycleBinI
tem,Connect-PnPOnline,ConvertTo-PnPClientSidePage,Copy-PnPFile,Copy-PnPItemProxy,Deny-PnPTenantServicePrincipalPermissi
onRequest,Disable-PnPFeature,Disable-PnPSharingForNonOwnersOfSite,Disable-PnPSiteClassification,Disable-PnPTenantServic
ePrincipal,Disconnect-PnPOnline,Enable-PnPCommSite,Enable-PnPFeature,Enable-PnPSiteClassification,Enable-PnPTenantServi
cePrincipal,Export-PnPClientSidePage,Export-PnPClientSidePageMapping,Export-PnPTaxonomy,Export-PnPTermGroupToXml,Find-P
nPFile,Get-PnPAADUser,Get-PnPAccessToken,Get-PnPAlert,Get-PnPApp,Get-PnPAppAuthAccessToken,Get-PnPApplicationCustomizer
,Get-PnPAuditing,Get-PnPAuthenticationRealm,Get-PnPAvailableClientSideComponents,Get-PnPAvailableLanguage,Get-PnPAzureC
ertificate,Get-PnPClientSideComponent,Get-PnPClientSidePage,Get-PnPConnection,Get-PnPContentType,Get-PnPContentTypePubl
ishingHubUrl,Get-PnPContext,Get-PnPCustomAction,Get-PnPDefaultColumnValues,Get-PnPDeletedMicrosoft365Group,Get-PnPDocum
entSetTemplate,Get-PnPEventReceiver,Get-PnPException,Get-PnPFeature,Get-PnPField,Get-PnPFile,Get-PnPFileVersion,Get-PnP
Folder,Get-PnPFolderItem,Get-PnPFooter,Get-PnPGraphAccessToken,Get-PnPGraphSubscription,Get-PnPGroup,Get-PnPGroupMember
s,Get-PnPGroupPermissions,Get-PnPHideDefaultThemes,Get-PnPHomePage,Get-PnPHomeSite,Get-PnPHubSite,Get-PnPHubSiteChild,G
et-PnPIndexedPropertyKeys,Get-PnPInPlaceRecordsManagement,Get-PnPIsSiteAliasAvailable,Get-PnPJavaScriptLink,Get-PnPKnow
ledgeHubSite,Get-PnPLabel,Get-PnPList,Get-PnPListInformationRightsManagement,Get-PnPListItem,Get-PnPListRecordDeclarati
on,Get-PnPMasterPage,Get-PnPMicrosoft365Group,Get-PnPMicrosoft365GroupMembers,Get-PnPMicrosoft365GroupOwners,Get-PnPNav
igationNode,Get-PnPOffice365CurrentServiceStatus,Get-PnPOffice365HistoricalServiceStatus,Get-PnPOffice365ServiceMessage
,Get-PnPOffice365Services,Get-PnPOrgAssetsLibrary,Get-PnPOrgNewsSite,Get-PnPPowerShellTelemetryEnabled,Get-PnPProperty,
Get-PnPPropertyBag,Get-PnPPublishingImageRendition,Get-PnPRecycleBinItem,Get-PnPRequestAccessEmails,Get-PnPRoleDefiniti
on,Get-PnPSearchConfiguration,Get-PnPSearchCrawlLog,Get-PnPSearchSettings,Get-PnPSharingForNonOwnersOfSite,Get-PnPSite,
Get-PnPSiteClassification,Get-PnPSiteClosure,Get-PnPSiteCollectionAdmin,Get-PnPSiteCollectionTermStore,Get-PnPSiteDesig
n,Get-PnPSiteDesignRights,Get-PnPSiteDesignRun,Get-PnPSiteDesignRunStatus,Get-PnPSiteDesignTask,Get-PnPSitePolicy,Get-P
nPSiteScript,Get-PnPSiteScriptFromList,Get-PnPSiteScriptFromWeb,Get-PnPSiteSearchQueryResults,Get-PnPStorageEntity,Get-
PnPStoredCredential,Get-PnPSubWebs,Get-PnPTaxonomyItem,Get-PnPTaxonomySession,Get-PnPTeamsApp,Get-PnPTeamsChannel,Get-P
nPTeamsChannelMessage,Get-PnPTeamsTab,Get-PnPTeamsTeam,Get-PnPTeamsUser,Get-PnPTenant,Get-PnPTenantAppCatalogUrl,Get-Pn
PTenantCdnEnabled,Get-PnPTenantCdnOrigin,Get-PnPTenantCdnPolicies,Get-PnPTenantId,Get-PnPTenantRecycleBinItem,Get-PnPTe
nantSequence,Get-PnPTenantSequenceSite,Get-PnPTenantServicePrincipal,Get-PnPTenantServicePrincipalPermissionGrants,Get-
PnPTenantServicePrincipalPermissionRequests,Get-PnPTenantSite,Get-PnPTenantSyncClientRestriction,Get-PnPTenantTemplate,
Get-PnPTenantTheme,Get-PnPTerm,Get-PnPTermGroup,Get-PnPTermSet,Get-PnPTheme,Get-PnPTimeZoneId,Get-PnPUnifiedAuditLog,Ge
t-PnPUPABulkImportStatus,Get-PnPUser,Get-PnPUserOneDriveQuota,Get-PnPUserProfileProperty,Get-PnPView,Get-PnPWeb,Get-PnP
WebhookSubscriptions,Get-PnPWebPart,Get-PnPWebPartProperty,Get-PnPWebPartXml,Get-PnPWebTemplates,Get-PnPWikiPageContent
,Grant-PnPHubSiteRights,Grant-PnPSiteDesignRights,Grant-PnPTenantServicePrincipalPermission,Import-PnPTaxonomy,Import-P
nPTermGroupFromXml,Import-PnPTermSet,Initialize-PnPPowerShellAuthentication,Install-PnPApp,Invoke-PnPQuery,Invoke-PnPSi
teDesign,Invoke-PnPSPRestMethod,Invoke-PnPWebAction,Measure-PnPList,Measure-PnPWeb,Move-PnPClientSideComponent,Move-PnP
File,Move-PnPFolder,Move-PnPItemProxy,Move-PnPListItemToRecycleBin,Move-PnPRecycleBinItem,New-PnPAzureCertificate,New-P
nPExtensibilityHandlerObject,New-PnPGraphSubscription,New-PnPGroup,New-PnPList,New-PnPMicrosoft365Group,New-PnPPersonal
Site,New-PnPSite,New-PnPTeamsApp,New-PnPTeamsTeam,New-PnPTenantSequence,New-PnPTenantSequenceCommunicationSite,New-PnPT
enantSequenceTeamNoGroupSite,New-PnPTenantSequenceTeamNoGroupSubSite,New-PnPTenantSequenceTeamSite,New-PnPTenantSite,Ne
w-PnPTenantTemplate,New-PnPTerm,New-PnPTermGroup,New-PnPTermLabel,New-PnPTermSet,New-PnPUPABulkImportJob,New-PnPUser,Ne
w-PnPWeb,Publish-PnPApp,Read-PnPTenantTemplate,Register-PnPAppCatalogSite,Register-PnPHubSite,Register-PnPManagementShe
llAccess,Remove-PnPAlert,Remove-PnPApp,Remove-PnPApplicationCustomizer,Remove-PnPClientSideComponent,Remove-PnPClientSi
dePage,Remove-PnPContentType,Remove-PnPContentTypeFromDocumentSet,Remove-PnPContentTypeFromList,Remove-PnPCustomAction,
Remove-PnPDeletedMicrosoft365Group,Remove-PnPEventReceiver,Remove-PnPField,Remove-PnPFieldFromContentType,Remove-PnPFil
e,Remove-PnPFileVersion,Remove-PnPFolder,Remove-PnPGraphSubscription,Remove-PnPGroup,Remove-PnPHomeSite,Remove-PnPHubSi
teAssociation,Remove-PnPIndexedProperty,Remove-PnPJavaScriptLink,Remove-PnPKnowledgeHubSite,Remove-PnPList,Remove-PnPLi
stItem,Remove-PnPMicrosoft365Group,Remove-PnPMicrosoft365GroupMember,Remove-PnPMicrosoft365GroupOwner,Remove-PnPNavigat
ionNode,Remove-PnPOrgAssetsLibrary,Remove-PnPOrgNewsSite,Remove-PnPPropertyBagValue,Remove-PnPPublishingImageRendition,
Remove-PnPRoleDefinition,Remove-PnPSearchConfiguration,Remove-PnPSiteClassification,Remove-PnPSiteCollectionAdmin,Remov
e-PnPSiteCollectionAppCatalog,Remove-PnPSiteDesign,Remove-PnPSiteDesignTask,Remove-PnPSiteScript,Remove-PnPStorageEntit
y,Remove-PnPStoredCredential,Remove-PnPTaxonomyItem,Remove-PnPTeamsApp,Remove-PnPTeamsChannel,Remove-PnPTeamsTab,Remove
-PnPTeamsTeam,Remove-PnPTeamsUser,Remove-PnPTenantCdnOrigin,Remove-PnPTenantSite,Remove-PnPTenantTheme,Remove-PnPTermGr
oup,Remove-PnPUser,Remove-PnPUserFromGroup,Remove-PnPView,Remove-PnPWeb,Remove-PnPWebhookSubscription,Remove-PnPWebPart
,Remove-PnPWikiPage,Rename-PnPFile,Rename-PnPFolder,Request-PnPAccessToken,Request-PnPReIndexList,Request-PnPReIndexWeb
PageConversionLog,Save-PnPTenantTemplate,Send-PnPMail,Set-PnPApplicationCustomizer,Set-PnPAppSideLoading,Set-PnPAuditin
g,Set-PnPAvailablePageLayouts,Set-PnPClientSidePage,Set-PnPClientSideText,Set-PnPClientSideWebPart,Set-PnPContext,Set-P
nPDefaultColumnValues,Set-PnPDefaultContentTypeToList,Set-PnPDefaultPageLayout,Set-PnPDocumentSetField,Set-PnPField,Set
-PnPFileCheckedIn,Set-PnPFileCheckedOut,Set-PnPFolderPermission,Set-PnPFooter,Set-PnPGraphSubscription,Set-PnPGroup,Set
-PnPGroupPermissions,Set-PnPHideDefaultThemes,Set-PnPHomePage,Set-PnPHomeSite,Set-PnPHubSite,Set-PnPIndexedProperties,S
et-PnPInPlaceRecordsManagement,Set-PnPKnowledgeHubSite,Set-PnPLabel,Set-PnPList,Set-PnPListInformationRightsManagement,
Set-PnPListItem,Set-PnPListItemAsRecord,Set-PnPListItemPermission,Set-PnPListPermission,Set-PnPListRecordDeclaration,Se
t-PnPMasterPage,Set-PnPMicrosoft365Group,Set-PnPMinimalDownloadStrategy,Set-PnPPropertyBagValue,Set-PnPRequestAccessEma
ils,Set-PnPSearchConfiguration,Set-PnPSearchSettings,Set-PnPSite,Set-PnPSiteClosure,Set-PnPSiteDesign,Set-PnPSitePolicy
,Set-PnPSiteScript,Set-PnPStorageEntity,Set-PnPTaxonomyFieldValue,Set-PnPTeamifyPromptHidden,Set-PnPTeamsChannel,Set-Pn
PTeamsTab,Set-PnPTeamsTeam,Set-PnPTeamsTeamArchivedState,Set-PnPTeamsTeamPicture,Set-PnPTenant,Set-PnPTenantAppCatalogU
rl,Set-PnPTenantCdnEnabled,Set-PnPTenantCdnPolicy,Set-PnPTenantSite,Set-PnPTenantSyncClientRestriction,Set-PnPTermGroup
,Set-PnPTermSet,Set-PnPTheme,Set-PnPTraceLog,Set-PnPUserOneDriveQuota,Set-PnPUserProfileProperty,Set-PnPView,Set-PnPWeb
,Set-PnPWebhookSubscription,Set-PnPWebPartProperty,Set-PnPWebPermission,Set-PnPWebTheme,Set-PnPWikiPageContent,Submit-P
nPSearchQuery,Submit-PnPTeamsChannelMessage,Sync-PnPAppToTeams,Test-PnPListItemIsRecord,Test-PnPTenantTemplate,Uninstal
l-PnPApp,Unpublish-PnPApp,Unregister-PnPHubSite,Update-PnPApp,Update-PnPSiteClassification,Update-PnPTeamsApp'. This mo
dule 'SharePointPnPPowerShellOnline' may override the existing commands. If you still want to install this module 'Shar
ePointPnPPowerShellOnline', use -AllowClobber parameter.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:9711 char:34
+ ... talledPackages = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
   Exception
    + FullyQualifiedErrorId : CommandAlreadyAvailable,Validate-ModuleCommandAlreadyAvailable,Microsoft.PowerShell.Pack
   ageManagement.Cmdlets.InstallPackage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.