Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-PnPSiteTemplate -Out lists.xml -Handlers Lists - Exception: Object reference not set to an instance of an object. #992

Open
RickardLoefberg opened this issue Mar 7, 2024 · 0 comments

Comments

@RickardLoefberg
Copy link

RickardLoefberg commented Mar 7, 2024

Getting "Object reference not set to an instance of an object" when trying to generate the template.
It fails on the same list every time I run the command.

PS C:\Users\xxxxx> Connect-PnPOnline https://xxxx.sharepoint.com/sites/xxxxx/yyyyy-Interactive
PS C:\Users\xxxxx> Get-PnPSiteTemplate -Out lists.xml -Handlers Lists -Force
Get-PnPSiteTemplate: Object reference not set to an instance of an object.
PS C:\Users\xxxxx> Get-PnPException

Message          : Object reference not set to an instance of an object.
Stacktrace       :    at PnP.PowerShell.Commands.Base.PnPConnectedCmdlet.ProcessRecord() in
                   c:\build\src\Commands\Base\PnPConnectedCmdlet.cs:line 101
                      at PnP.PowerShell.Commands.PnPSharePointCmdlet.ProcessRecord() in
                   c:\build\src\Commands\Base\PnPSharePointCmdlet.cs:line 131
                      at System.Management.Automation.CommandProcessor.ProcessRecord()
ScriptLineNumber : 1

Running PnP.PowerShell version 2.4.0.
User is site collection administrator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant